diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-10-14 19:42:48 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-02-18 11:43:42 +0100 |
commit | c3cb642947c42de48a64e79b15af77ff900d2491 (patch) | |
tree | 794782bf243bafa26a6ae103a9e9ede8c2c76d21 /plugingui/maintab.cc | |
parent | 6a90e6c24f05c57cdbe19e5cc44c77c9e5810148 (diff) |
Added latency filter UI controls.
Diffstat (limited to 'plugingui/maintab.cc')
-rw-r--r-- | plugingui/maintab.cc | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/plugingui/maintab.cc b/plugingui/maintab.cc index 8b6e478..84e8a92 100644 --- a/plugingui/maintab.cc +++ b/plugingui/maintab.cc @@ -40,22 +40,26 @@ MainTab::MainTab(Widget* parent, , diskstreamingframe_content{this, settings, settings_notifier} , bleedcontrolframe_content{this, settings, settings_notifier} , resamplingframe_content{this, settings_notifier} + , timingframe_content{this, settings, settings_notifier} , settings(settings) , settings_notifier(settings_notifier) { layout.setSpacing(0); layout.setResizeChildren(true); - add("Drumkit", drumkit_frame, drumkitframe_content, 20, 0); - add("Status", status_frame, statusframe_content, 29, 0); - add("Humanizer", humanizer_frame, humanizerframe_content, 13, 1); - add("Disk Streaming", diskstreaming_frame, diskstreamingframe_content, 11, 1); - add("Bleed Control", bleedcontrol_frame, bleedcontrolframe_content, 11, 1); - add("Resampling", resampling_frame, resamplingframe_content, 14, 1); + add("Drumkit", drumkit_frame, drumkitframe_content, 15, 0); + add("Status", status_frame, statusframe_content, 24, 0); + add("Disk Streaming", diskstreaming_frame, diskstreamingframe_content, 10, 0); + + add("Velocity Humanizer", humanizer_frame, humanizerframe_content, 12, 1); + add("Timing Humanizer", timing_frame, timingframe_content, 12, 1); + add("Bleed Control", bleedcontrol_frame, bleedcontrolframe_content, 10, 1); + add("Resampling", resampling_frame, resamplingframe_content, 15, 1); humanizer_frame.setOnSwitch(settings.enable_velocity_modifier); bleedcontrol_frame.setOnSwitch(settings.enable_bleed_control); resampling_frame.setOnSwitch(settings.enable_resampling); + timing_frame.setOnSwitch(settings.enable_latency_modifier); CONNECT(this, settings_notifier.enable_velocity_modifier, &humanizer_frame, &FrameWidget::setOnSwitch); @@ -67,6 +71,8 @@ MainTab::MainTab(Widget* parent, this, &MainTab::bleedcontrolOnChange); CONNECT(&resampling_frame, onSwitchChangeNotifier, this, &MainTab::resamplingOnChange); + CONNECT(&timing_frame, onSwitchChangeNotifier, + this, &MainTab::timingOnChange); } void MainTab::resize(std::size_t width, std::size_t height) @@ -94,8 +100,13 @@ void MainTab::resamplingOnChange(bool on) settings.enable_resampling.store(on); } +void MainTab::timingOnChange(bool on) +{ + settings.enable_latency_modifier.store(on); +} + void MainTab::add(std::string const& title, FrameWidget& frame, Widget& content, - std::size_t height, int column) + std::size_t height, int column) { layout.addItem(&frame); frame.setTitle(title); |