diff options
author | Rainer Hochecker <fernetmenta@online.de> | 2013-09-28 16:28:33 +0200 |
---|---|---|
committer | Rainer Hochecker <fernetmenta@online.de> | 2013-09-28 16:51:55 +0200 |
commit | 9784790e4a9163bbde4fa939cfcc1b2d0c46a070 (patch) | |
tree | f68108e56da38a8a053337321aa4fe2a1a347e20 | |
parent | 373a76bf5a73e3f0747c16c6dcdc9ca33a1f51a8 (diff) |
ActiveAE: tell resampler to clamp floats
-rw-r--r-- | xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResample.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResample.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResample.cpp index 7649b7ab2c..4070b818f5 100644 --- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResample.cpp +++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResample.cpp @@ -82,6 +82,15 @@ bool CActiveAEResample::Init(uint64_t dst_chan_layout, int dst_channels, int dst m_dllAvUtil.av_opt_set_int(m_pContext, "output_sample_bits", m_dst_bits, 0); } + // tell resampler to clamp float values + // not required for sink stage (remapLayout == true) + if ((m_dst_fmt == AV_SAMPLE_FMT_FLT || m_dst_fmt == AV_SAMPLE_FMT_FLTP) && + (m_src_fmt == AV_SAMPLE_FMT_FLT || m_src_fmt == AV_SAMPLE_FMT_FLTP) && + !remapLayout) + { + m_dllAvUtil.av_opt_set_double(m_pContext, "rematrix_maxval", 1.0, 0); + } + if(!m_pContext) { CLog::Log(LOGERROR, "CActiveAEResample::Init - create context failed"); |