29 using Selection::Selection;
34 return getCurrentAudioClip() || isSampleModeSample(modControllable, whichThing);
37 void readCurrentValue()
override { this->setValue(soundEditor.currentSampleControls->pitchAndSpeedAreIndependent); }
39 void writeCurrentValue()
override {
41 if (currentUIMode == UI_MODE_HOLDING_AFFECT_ENTIRE_IN_SOUND_EDITOR && soundEditor.editingKitRow()) {
43 Kit* kit = getCurrentKit();
45 for (
Drum* thisDrum = kit->firstDrum; thisDrum !=
nullptr; thisDrum = thisDrum->next) {
46 if (thisDrum->type == DrumType::SOUND) {
47 auto* soundDrum =
static_cast<SoundDrum*
>(thisDrum);
48 Source* source = &soundDrum->sources[soundEditor.currentSourceIndex];
50 source->sampleControls.pitchAndSpeedAreIndependent = this->getValue();
56 soundEditor.currentSampleControls->pitchAndSpeedAreIndependent = this->getValue();
60 deluge::vector<std::string_view> getOptions(OptType optType)
override {
62 return {l10n::getView(l10n::String::STRING_FOR_LINKED), l10n::getView(l10n::String::STRING_FOR_INDEPENDENT)};