mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 21:26:49 +00:00
xbmc: add PR2382
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
683ab7ee3d
commit
e0280ea6d3
46
packages/mediacenter/xbmc/patches/xbmc-990.19-PR2382.patch
Normal file
46
packages/mediacenter/xbmc/patches/xbmc-990.19-PR2382.patch
Normal file
@ -0,0 +1,46 @@
|
||||
From eb4ae32119a83716d7fb930381d2848c02383cea Mon Sep 17 00:00:00 2001
|
||||
From: fritsch <peter.fruehberger@gmail.com>
|
||||
Date: Wed, 6 Mar 2013 07:52:59 +0100
|
||||
Subject: [PATCH] AE: Fix menu sounds by decreasing buffer(max 200 ms) and
|
||||
periodSize(50 ms)
|
||||
|
||||
---
|
||||
xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp | 19 ++++++++++---------
|
||||
1 file changed, 10 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
|
||||
index 821bd2e..21891a5 100644
|
||||
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
|
||||
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
|
||||
@@ -332,18 +332,19 @@ bool CAESinkALSA::InitializeHW(AEAudioFormat &format)
|
||||
snd_pcm_hw_params_get_period_size_max(hw_params, &periodSize, NULL);
|
||||
|
||||
/*
|
||||
- We want to make sure, that we have approx 500 to 800 ms Buffer with
|
||||
- a periodSize of approx 100 ms.
|
||||
- It is calced:
|
||||
- periodSize = sampleRate / 10
|
||||
- buffersize = periodSize * 1 frame * 8.
|
||||
+ We want to make sure, that we have max 200 ms Buffer with
|
||||
+ a periodSize of approx 50 ms. Choosing a higher bufferSize
|
||||
+ will cause problems with menu sounds. Buffer will be increased
|
||||
+ after those are fixed.
|
||||
+ periodSize = sampleRate / 20
|
||||
+ bufferSize = periodSize * 1 frame * 4.
|
||||
*/
|
||||
- periodSize = std::min(periodSize, (snd_pcm_uframes_t) sampleRate / 10);
|
||||
- bufferSize = std::min(bufferSize, (snd_pcm_uframes_t) periodSize * 8);
|
||||
+ periodSize = std::min(periodSize, (snd_pcm_uframes_t) sampleRate / 20);
|
||||
+ bufferSize = std::min(bufferSize, (snd_pcm_uframes_t) periodSize * 4);
|
||||
|
||||
/*
|
||||
- According to upstream we should set buffer size first - so make sure it is always at least
|
||||
- double of period size to not get underruns
|
||||
+ According to upstream we should set buffer size first - so make sure it is always at least
|
||||
+ double of period size to not get underruns
|
||||
*/
|
||||
periodSize = std::min(periodSize, bufferSize / 2);
|
||||
|
||||
--
|
||||
1.7.10
|
||||
|
Loading…
x
Reference in New Issue
Block a user