WIP: clap

This commit is contained in:
2026-02-20 22:14:21 +01:00
parent 12752e0167
commit 00d6eb2f1f
76 changed files with 9103 additions and 143 deletions

View File

@@ -258,12 +258,52 @@ impl AudioSettings {
self.input_devices = doux::audio::list_input_devices();
}
pub fn next_section(&mut self) {
self.section = self.section.next();
pub fn next_section(&mut self, plugin_mode: bool) {
self.section = if plugin_mode {
match self.section {
EngineSection::Settings => EngineSection::Samples,
EngineSection::Samples => EngineSection::Settings,
EngineSection::Devices => EngineSection::Settings,
}
} else {
self.section.next()
};
}
pub fn prev_section(&mut self) {
self.section = self.section.prev();
pub fn prev_section(&mut self, plugin_mode: bool) {
self.section = if plugin_mode {
match self.section {
EngineSection::Settings => EngineSection::Samples,
EngineSection::Samples => EngineSection::Settings,
EngineSection::Devices => EngineSection::Settings,
}
} else {
self.section.prev()
};
}
pub fn next_setting(&mut self, plugin_mode: bool) {
self.setting_kind = if plugin_mode {
match self.setting_kind {
SettingKind::Polyphony => SettingKind::Nudge,
SettingKind::Nudge => SettingKind::Polyphony,
_ => SettingKind::Polyphony,
}
} else {
self.setting_kind.next()
};
}
pub fn prev_setting(&mut self, plugin_mode: bool) {
self.setting_kind = if plugin_mode {
match self.setting_kind {
SettingKind::Polyphony => SettingKind::Nudge,
SettingKind::Nudge => SettingKind::Polyphony,
_ => SettingKind::Polyphony,
}
} else {
self.setting_kind.prev()
};
}
pub fn current_output_device_index(&self) -> usize {