diff --git a/packages/mediacenter/xbmc/patches/xbmc-990.24-PR2375.patch b/packages/mediacenter/xbmc/patches/xbmc-990.24-PR2375.patch new file mode 100644 index 0000000000..ddf3dd7e81 --- /dev/null +++ b/packages/mediacenter/xbmc/patches/xbmc-990.24-PR2375.patch @@ -0,0 +1,31 @@ +From 8717c162b8c5092d77672351ce3bfa2d4e7e32d8 Mon Sep 17 00:00:00 2001 +From: fritsch +Date: Tue, 5 Mar 2013 22:17:15 +0100 +Subject: [PATCH] AE: Fix resample of e.g. 192 khz to 48 khz audio by scaling + the usual suspects with the src sampleRate + +--- + xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.cpp | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.cpp b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.cpp +index 258dcac..a64beb1 100644 +--- a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.cpp ++++ b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.cpp +@@ -196,6 +196,13 @@ void CSoftAEStream::Initialize() + m_ssrcData.data_out = (float*)_aligned_malloc(m_format.m_frameSamples * (int)std::ceil(m_ssrcData.src_ratio) * sizeof(float), 16); + m_ssrcData.output_frames = m_format.m_frames * (long)std::ceil(m_ssrcData.src_ratio); + m_ssrcData.end_of_input = 0; ++ // we must buffer the same amount as before but taking the source sample rate into account ++ // there is no reason to decrease the buffer for upsampling ++ if (m_internalRatio < 1) ++ { ++ m_waterLevel *= (1.0 / m_internalRatio); ++ m_refillBuffer = m_waterLevel; ++ } + } + + m_limiter.SetSamplerate(AE.GetSampleRate()); +-- +1.7.10 +