mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
xbmc: add PR2375
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
9832770f9e
commit
6a6334f2fd
31
packages/mediacenter/xbmc/patches/xbmc-990.24-PR2375.patch
Normal file
31
packages/mediacenter/xbmc/patches/xbmc-990.24-PR2375.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 8717c162b8c5092d77672351ce3bfa2d4e7e32d8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: fritsch <peter.fruehberger@gmail.com>
|
||||||
|
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
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user