]> git.sesse.net Git - nageru/blobdiff - mixer.cpp
Make the locut filter possible to disable.
[nageru] / mixer.cpp
index 39bae192c5bda7722f2aa527da80e62b990ba7fe..cfdb5b190b1b25f828227d6b59fdc8fe9eeda455 100644 (file)
--- a/mixer.cpp
+++ b/mixer.cpp
@@ -709,7 +709,9 @@ void Mixer::process_audio_one_frame(int64_t frame_pts_int, int num_samples)
        // 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