]> git.sesse.net Git - nageru/blobdiff - mainwindow.cpp
Fix an issue where cutoff would not be properly marked when setting new mappings.
[nageru] / mainwindow.cpp
index ea742f701dc40cef3c37685c670cb8e046b59194..f59824cabd053364246c22558df64147ed5991a8 100644 (file)
@@ -421,6 +421,8 @@ void MainWindow::setup_audio_expanded_view()
                reduction_meter->set_ref_level(0.0f);
                reduction_meter->set_flip(true);
        }
+
+       update_cutoff_labels(global_mixer->get_audio_mixer()->get_locut_cutoff());
 }
 
 void MainWindow::mixer_shutting_down()
@@ -495,7 +497,11 @@ void MainWindow::cutoff_knob_changed(int value)
        float octaves = value * 0.1f;
        float cutoff_hz = 20.0 * pow(2.0, octaves);
        global_mixer->get_audio_mixer()->set_locut_cutoff(cutoff_hz);
+       update_cutoff_labels(cutoff_hz);
+}
 
+void MainWindow::update_cutoff_labels(float cutoff_hz)
+{
        char buf[256];
        snprintf(buf, sizeof(buf), "%ld Hz", lrintf(cutoff_hz));
        ui->locut_cutoff_display->setText(buf);