From: Steinar H. Gunderson Date: Mon, 9 Nov 2015 21:59:29 +0000 (+0100) Subject: Fetch default threshold displays from the mixer. X-Git-Tag: 1.0.0~139 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=e8918c22dd8cd509d9679d50bfc6bba86661ebb3;p=nageru Fetch default threshold displays from the mixer. --- diff --git a/mainwindow.cpp b/mainwindow.cpp index a19a456..de0b4da 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -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 01712b8..64a74e2 100644 --- 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;