libswresample mono to stereo conversion is lowering the amplitude
|Reported by:||Albert Zeyer||Owned by:||Michael Niedermayer|
|Blocking:||Reproduced by developer:||yes|
|Analyzed by developer:||no|
I am resampling sound data with libswresample. I have one sample case where I resample
44100Hz, sint16, mono
44100Hz, sint16, stereo.
I.e. this is just a mono to stereo conversion.
I was expecting that
leftSample = rightSample = monoSample;
However, I was more getting something mostly like:
leftSample = rightSample = monoSample / 1.41;
(maybe 1.41 ~= sqrt(2) ?)
Is this a bug? Or expected? I don't have profesional audio background but I heard that a normal mono to stereo conversion is as what I would expect. I also have seen many different implementations where it is done like this, e.g. the main ReplayGain implementation.