]> git.sesse.net Git - nageru/commitdiff
Fetch default threshold displays from the mixer.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 9 Nov 2015 21:59:29 +0000 (22:59 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 9 Nov 2015 21:59:47 +0000 (22:59 +0100)
mainwindow.cpp
mixer.h

index a19a4560ab1c69b5bae9f42d871d16fff511d47f..de0b4da2ef507103da245fae47285a1daec44538 100644 (file)
@@ -92,6 +92,12 @@ void MainWindow::mixer_created(Mixer *mixer)
                connect(ui_display->wb_button, &QPushButton::clicked, bind(&MainWindow::wb_button_clicked, this, i));
        }
 
+       char buf[256];
+       snprintf(buf, sizeof(buf), "%.1f dB", mixer->get_limiter_threshold_dbfs());
+       ui->limiter_threshold_db_display->setText(buf);
+       snprintf(buf, sizeof(buf), "%.1f dB", mixer->get_compressor_threshold_dbfs());
+       ui->compressor_threshold_db_display->setText(buf);
+
        connect(ui->locut_cutoff_knob, &QDial::valueChanged, this, &MainWindow::cutoff_knob_changed);
        connect(ui->limiter_threshold_knob, &QDial::valueChanged, this, &MainWindow::limiter_threshold_knob_changed);
        connect(ui->compressor_threshold_knob, &QDial::valueChanged, this, &MainWindow::compressor_threshold_knob_changed);
diff --git a/mixer.h b/mixer.h
index 01712b8f136a0b116cc27c3d603b2c3b2613e348..64a74e2f13d855d0030a19645cdadf95956b9558 100644 (file)
--- a/mixer.h
+++ b/mixer.h
@@ -137,6 +137,16 @@ public:
                locut_cutoff_hz = cutoff_hz;
        }
 
+       float get_limiter_threshold_dbfs()
+       {
+               return limiter_threshold_dbfs;
+       }
+
+       float get_compressor_threshold_dbfs()
+       {
+               return compressor_threshold_dbfs;
+       }
+
        void set_limiter_threshold_dbfs(float threshold_dbfs)
        {
                limiter_threshold_dbfs = threshold_dbfs;