X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=mixer.cpp;h=1f1035bf84065ef9c7ccca19afb8a5a51a1075e0;hb=bd7755947b1c46f046cb9ddcff5bcfbf2d151fa1;hp=9565894d420722e802d59aa4692373ff819a02b3;hpb=a7e2ac88533d4a24b740c9fcf2b911c7b07541e0;p=nageru diff --git a/mixer.cpp b/mixer.cpp index 9565894..1f1035b 100644 --- a/mixer.cpp +++ b/mixer.cpp @@ -261,6 +261,14 @@ Mixer::Mixer(const QSurfaceFormat &format, unsigned num_cards) locut.init(FILTER_HPF, 2); + // If --flat-audio is given, turn off everything that messes with the sound, + // except the final makeup gain. + if (global_flags.flat_audio) { + set_locut_enabled(false); + set_limiter_enabled(false); + set_compressor_enabled(false); + } + // hlen=16 is pretty low quality, but we use quite a bit of CPU otherwise, // and there's a limit to how important the peak meter is. peak_resampler.setup(OUTPUT_FREQUENCY, OUTPUT_FREQUENCY * 4, /*num_channels=*/2, /*hlen=*/16, /*frel=*/1.0);