audio: change mixing engine float range to [-1.f, 1.f]
commit4218fdd77f1c8ab4dab5ced30c3a0db946a6f04c
authorVolker Rümelin <vr_qemu@t-online.de>
Sun, 8 Mar 2020 19:33:19 +0000 (8 20:33 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 16 Mar 2020 09:18:07 +0000 (16 10:18 +0100)
tree745497ef3f568102766610a444c73773f440532b
parent33a93baeae4ca8f03a84b194c55f6e5ee09c33f8
audio: change mixing engine float range to [-1.f, 1.f]

Currently the internal float range of the mixing engine is
[-.5f, .5f]. PulseAudio, SDL2 and libasound use a [-1.f, 1.f]
range. This means with float samples the audio playback volume
is 6dB too low and audio recording signals will be clipped in
most cases.

To avoid another scaling factor in the conv_natural_float_* and
clip_natural_float_* functions with FLOAT_MIXENG defined this
patch changes the mixing engine float range to [-1.f, 1.f].

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Message-id: 20200308193321.20668-4-vr_qemu@t-online.de
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
audio/mixeng.c
audio/mixeng_template.h