]> git.sesse.net Git - nageru/blobdiff - mainwindow.cpp
Add the two final missing MIDI mappings, namely buttons for toggling limiter and...
[nageru] / mainwindow.cpp
index d1826bc2238ff0227cae02dd61a73a9e07a6c7a8..79221e162e8cb89c6317407a55fc83594b0df29e 100644 (file)
@@ -919,6 +919,8 @@ void MainWindow::clear_all_highlights()
                highlight_locut(false);
                highlight_limiter_threshold(false);
                highlight_makeup_gain(false);
+               highlight_toggle_limiter(false);
+               highlight_toggle_auto_makeup_gain(false);
                for (unsigned bus_idx = 0; bus_idx < audio_expanded_views.size(); ++bus_idx) {
                        highlight_treble(bus_idx, false);
                        highlight_mid(bus_idx, false);
@@ -933,6 +935,20 @@ void MainWindow::clear_all_highlights()
        });
 }
 
+void MainWindow::toggle_limiter()
+{
+       if (global_audio_mixer->get_mapping_mode() == AudioMixer::MappingMode::MULTICHANNEL) {
+               ui->limiter_enabled->click();
+       }
+}
+
+void MainWindow::toggle_auto_makeup_gain()
+{
+       if (global_audio_mixer->get_mapping_mode() == AudioMixer::MappingMode::MULTICHANNEL) {
+               ui->makeup_gain_auto_checkbox->click();
+       }
+}
+
 void MainWindow::highlight_locut(bool highlight)
 {
        post_to_main_thread([this, highlight]{
@@ -1002,6 +1018,22 @@ void MainWindow::highlight_toggle_compressor(unsigned bus_idx, bool highlight)
        highlight_control_if_exists(bus_idx, &Ui::AudioExpandedView::compressor_enabled, highlight);
 }
 
+void MainWindow::highlight_toggle_limiter(bool highlight)
+{
+       post_to_main_thread([this, highlight]{
+               highlight_control(ui->limiter_enabled, highlight);
+               highlight_control(ui->limiter_enabled_2, highlight);
+       });
+}
+
+void MainWindow::highlight_toggle_auto_makeup_gain(bool highlight)
+{
+       post_to_main_thread([this, highlight]{
+               highlight_control(ui->makeup_gain_auto_checkbox, highlight);
+               highlight_control(ui->makeup_gain_auto_checkbox_2, highlight);
+       });
+}
+
 template<class T>
 void MainWindow::set_relative_value(T *control, float value)
 {