aboutsummaryrefslogtreecommitdiff
path: root/audio/mixeng_template.h
AgeCommit message (Collapse)Author
2020-03-16audio: fix saturation nonlinearity in clip_* functionsVolker Rümelin
The current positive limit for the saturation nonlinearity is only correct if the type of the result has 8 bits or less. Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-id: 20200308193321.20668-5-vr_qemu@t-online.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-03-16audio: change mixing engine float range to [-1.f, 1.f]Volker Rümelin
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>
2013-10-26audio/mixeng_template.h: fix inline declarationAlex Bligh
Fix error: ‘inline’ is not at beginning of declaration [-Werror=old-style-declaration] Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2012-05-18audio: split IN_T into two separate constantsRoger Pau Monne
Split IN_T into BSIZE and ITYPE, to avoid expansion if the OS has defined macros for the intX_t and uintX_t types. The IN_T constant is then defined in mixeng_template.h so it can be used by the functions/macros on this header file. This change has been tested successfully under Debian Linux and NetBSD 6.0BETA. Cc: Vassili Karpov (malc) <av1474@comtv.ru> Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Signed-off-by: malc <av1474@comtv.ru>
2011-06-01audio: fix integer overflow expressionJuha Riihim?ki
Fix an integer overflow that can happen for signed 32 bit types when using FLOAT_MIXENG. (Note that at the moment this is only true when using the MacOSX coreaudio audio driver.) Signed-off-by: Juha Riihim?ki <juha.riihimaki@nokia.com> [Peter Maydell: Removed unnecessary casts] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: malc <av1474@comtv.ru>
2011-01-12audio: split sample conversion and volume mixingMichael Walle
Refactor the volume mixing, so it can be reused for capturing devices. Additionally, it removes superfluous multiplications with the nominal volume within the hardware voice code path. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: malc <av1474@comtv.ru>
2008-12-03Make audio violate POSIX lessmalc
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5864 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-23Make mixer emulation a configure option (Jan Kiszka)malc
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4783 c046a42c-6fe2-441c-8c8c-71466251a162
2005-10-30merged 15a_aqemu.patch audio patch (malc)bellard
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1584 c046a42c-6fe2-441c-8c8c-71466251a162
2004-11-07audio merge (malc)bellard
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1125 c046a42c-6fe2-441c-8c8c-71466251a162