connect(ui->locut_cutoff_knob, &QDial::valueChanged, this, &MainWindow::cutoff_knob_changed);
cutoff_knob_changed(ui->locut_cutoff_knob->value());
+ connect(ui->locut_enabled, &QCheckBox::stateChanged, [this](int state){
+ global_mixer->set_locut_enabled(state == Qt::Checked);
+ });
// Not QDial::valueChanged, as we call setValue() all the time.
connect(ui->gainstaging_knob, &QAbstractSlider::sliderMoved, this, &MainWindow::gain_staging_knob_changed);
// we don't need it for voice, and it will reduce headroom
// and confuse the compressor. (In particular, any hums at 50 or 60 Hz
// should be dampened.)
- locut.render(samples_out.data(), samples_out.size() / 2, locut_cutoff_hz * 2.0 * M_PI / OUTPUT_FREQUENCY, 0.5f);
+ if (locut_enabled) {
+ locut.render(samples_out.data(), samples_out.size() / 2, locut_cutoff_hz * 2.0 * M_PI / OUTPUT_FREQUENCY, 0.5f);
+ }
// Apply a level compressor to get the general level right.
// Basically, if it's over about -40 dBFS, we squeeze it down to that level
locut_cutoff_hz = cutoff_hz;
}
+ void set_locut_enabled(bool enabled)
+ {
+ locut_enabled = enabled;
+ }
+
float get_limiter_threshold_dbfs()
{
return limiter_threshold_dbfs;
Resampler peak_resampler;
std::atomic<float> peak{0.0f};
- StereoFilter locut; // Default cutoff 150 Hz, 24 dB/oct.
+ StereoFilter locut; // Default cutoff 120 Hz, 24 dB/oct.
std::atomic<float> locut_cutoff_hz;
+ std::atomic<bool> locut_enabled{true};
// First compressor; takes us up to about -12 dBFS.
StereoCompressor level_compressor; // Under compressor_mutex. Used to set/override gain_staging_db if <level_compressor_enabled>.
</property>
</widget>
</item>
- <item row="3" column="0">
- <widget class="QComboBox" name="comboBox">
- <property name="currentText">
- <string/>
- </property>
- </widget>
- </item>
<item row="3" column="3">
<widget class="QCheckBox" name="limiter_enabled">
<property name="text">
</property>
</widget>
</item>
+ <item row="3" column="0">
+ <widget class="QCheckBox" name="locut_enabled">
+ <property name="text">
+ <string>Enabled</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
<item>