Fix incorrect gain of L+R; it's dB not linear.
authorCarl Hetherington <cth@carlh.net>
Fri, 18 Sep 2015 21:31:41 +0000 (22:31 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 18 Sep 2015 21:31:41 +0000 (22:31 +0100)
src/lib/upmixer_a.cc

index a5850cf946f65b6e6efdd97f02fc566f08b5933d..0479f16b23f990c04ea350cecf60d67d9a2fdebd 100644 (file)
@@ -71,10 +71,10 @@ UpmixerA::run (shared_ptr<const AudioBuffers> in, int channels)
        shared_ptr<AudioBuffers> in_L = in->channel (0);
        shared_ptr<AudioBuffers> in_R = in->channel (1);
 
-       /* Mix of L and R */
+       /* Mix of L and R; -6dB down in amplitude (3dB in terms of power) */
        shared_ptr<AudioBuffers> in_LR = in_L->clone ();
        in_LR->accumulate_frames (in_R.get(), 0, 0, in_R->frames ());
-       in_LR->apply_gain (0.5);
+       in_LR->apply_gain (-6);
 
        /* Run filters */
        vector<shared_ptr<AudioBuffers> > all_out;