From: Steinar H. Gunderson Date: Thu, 29 Oct 2015 20:56:33 +0000 (+0100) Subject: Set the peak meter to red when peaking. X-Git-Tag: 1.0.0~206 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=7df6b04b086a5cd81030b1203bcedc95a9cd6702;p=nageru Set the peak meter to red when peaking. --- diff --git a/mainwindow.cpp b/mainwindow.cpp index 4dc0608..2888c83 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -100,6 +100,11 @@ void MainWindow::mixer_created(Mixer *mixer) char buf[256]; snprintf(buf, sizeof(buf), "%.1f", peak_db); ui->peak_display->setText(buf); + if (peak_db > -0.1f) { // -0.1 dBFS is EBU peak limit. + ui->peak_display->setStyleSheet("QLabel { background-color: red; color: white; }"); + } else { + ui->peak_display->setStyleSheet(""); + } }); }