]> git.sesse.net Git - nageru/commitdiff
Set the peak meter to red when peaking.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 29 Oct 2015 20:56:33 +0000 (21:56 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 29 Oct 2015 20:56:33 +0000 (21:56 +0100)
mainwindow.cpp

index 4dc06084a0e93bd51ef8e065607affd347bb6ffd..2888c83916de398ccd4ed7792fb9f96a10b0c606 100644 (file)
@@ -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("");
+               }
        });
 }