connect(ui_display->wb_button, &QPushButton::clicked, bind(&MainWindow::wb_button_clicked, this, i));
}
+ // TODO: Fetch all of the values these for completeness,
+ // not just the enable knobs implied by --flat-audio.
+ ui->locut_enabled->setChecked(global_mixer->get_locut_enabled());
+ ui->gainstaging_auto_checkbox->setChecked(global_mixer->get_gain_staging_auto());
+ ui->limiter_enabled->setChecked(global_mixer->get_limiter_enabled());
+ ui->compressor_enabled->setChecked(global_mixer->get_compressor_enabled());
+
char buf[256];
snprintf(buf, sizeof(buf), "%.1f dB", mixer->get_limiter_threshold_dbfs());
ui->limiter_threshold_db_display->setText(buf);
// except the final makeup gain.
if (global_flags.flat_audio) {
set_locut_enabled(false);
+ set_gain_staging_auto(false);
set_limiter_enabled(false);
set_compressor_enabled(false);
}
locut_enabled = enabled;
}
+ bool get_locut_enabled() const
+ {
+ return locut_enabled;
+ }
+
float get_limiter_threshold_dbfs()
{
return limiter_threshold_dbfs;
limiter_enabled = enabled;
}
+ bool get_limiter_enabled() const
+ {
+ return limiter_enabled;
+ }
+
void set_compressor_enabled(bool enabled)
{
compressor_enabled = enabled;
}
+ bool get_compressor_enabled() const
+ {
+ return compressor_enabled;
+ }
+
void set_gain_staging_db(float gain_db)
{
std::unique_lock<std::mutex> lock(compressor_mutex);
level_compressor_enabled = enabled;
}
+ bool get_gain_staging_auto() const
+ {
+ std::unique_lock<std::mutex> lock(compressor_mutex);
+ return level_compressor_enabled;
+ }
+
void set_final_makeup_gain_db(float gain_db)
{
std::unique_lock<std::mutex> lock(compressor_mutex);
std::atomic<bool> should_cut{false};
audio_level_callback_t audio_level_callback = nullptr;
- std::mutex compressor_mutex;
+ mutable std::mutex compressor_mutex;
Ebu_r128_proc r128; // Under compressor_mutex.
CorrelationMeasurer correlation; // Under compressor_mutex.