diff options
author | Peter Frühberger <Peter.Fruehberger@gmail.com> | 2013-11-28 10:56:02 -0800 |
---|---|---|
committer | Peter Frühberger <Peter.Fruehberger@gmail.com> | 2013-11-28 10:56:02 -0800 |
commit | 7c5118c434c73044f4d7a4e0fbc4b63d603ceb39 (patch) | |
tree | 9033b9bbc93195939be7efa9a831207691edab9a | |
parent | c70706545391f55af80ea399d55a7c54f213c36f (diff) | |
parent | cae77036079c6776ef6d96f31383ec6489ca6ad1 (diff) |
Merge pull request #3720 from FernetMenta/aefixes
ActiveAE: fix clipping for sinks using AE_FMT_FLOAT
-rw-r--r-- | xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp index 3fc6645d44..a3a61647f6 100644 --- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp +++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp @@ -1649,9 +1649,11 @@ bool CActiveAE::RunStages() fadingStep = delta / samples; } - // for streams amplification of turned off downmix normalization + // for stream amplification, + // turned off downmix normalization, + // or if sink format is float (in order to prevent from clipping) // we need to run on a per sample basis - if ((*it)->m_amplify != 1.0 || !(*it)->m_resampleBuffers->m_normalize) + if ((*it)->m_amplify != 1.0 || !(*it)->m_resampleBuffers->m_normalize || (m_sinkFormat.m_dataFormat == AE_FMT_FLOAT)) { nb_floats = out->pkt->config.channels / out->pkt->planes; nb_loops = out->pkt->nb_samples; |