WIP: clap
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user