27class AudioClipView final :
public ClipView,
public ClipMinder {
29 AudioClipView() =
default;
31 bool opened()
override;
32 void focusRegained()
override;
33 bool renderMainPads(uint32_t whichRows,
RGB image[][kDisplayWidth + kSideBarWidth],
34 uint8_t occupancyMask[][kDisplayWidth + kSideBarWidth],
bool drawUndefinedArea =
true)
override;
35 bool renderSidebar(uint32_t whichRows,
RGB image[][kDisplayWidth + kSideBarWidth],
36 uint8_t occupancyMask[][kDisplayWidth + kSideBarWidth])
override;
37 bool setupScroll(uint32_t oldScroll)
override;
38 void tellMatrixDriverWhichRowsContainSomethingZoomable()
override;
39 [[nodiscard]]
bool supportsTriplets()
const override {
return false; }
42 ActionResult buttonAction(deluge::hid::Button b,
bool on,
bool inCardRoutine)
override;
43 ActionResult padAction(int32_t x, int32_t y, int32_t velocity)
override;
45 void graphicsRoutine()
override;
46 void playbackEnded()
override;
48 void clipNeedsReRendering(
Clip* clip)
override;
49 void sampleNeedsReRendering(
Sample* sample)
override;
50 void selectEncoderAction(int8_t offset)
override;
51 void setClipLengthEqualToSampleLength();
52 void adjustLoopLength(int32_t newLength);
53 ActionResult horizontalEncoderAction(int32_t offset)
override;
54 ActionResult editClipLengthWithoutTimestretching(int32_t offset);
55 ActionResult verticalEncoderAction(int32_t offset,
bool inCardRoutine)
override;
56 ActionResult timerCallback()
override;
57 uint32_t getMaxLength()
override;
58 uint32_t getMaxZoom()
override;
63 UIType getUIType()
override {
return UIType::AUDIO_CLIP; }
66 uint32_t timeSongButtonPressed;
67 void needsRenderingDependingOnSubMode();
68 int32_t lastTickSquare;
69 bool mustRedrawTickSquares;
71 bool endMarkerVisible;
72 bool startMarkerVisible;
75 void changeUnderlyingSampleLength(AudioClip& clip,
const Sample* sample, int32_t newLength, int32_t oldLength,
76 uint64_t oldLengthSamples)
const;
77 void changeUnderlyingSampleStart(AudioClip& clip,
const Sample* sample, int32_t newStartTicks, int32_t oldLength,
78 uint64_t oldLengthSamples)
const;