mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 05:36:47 +00:00
xbmc: add another AE fix
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
013d435d32
commit
9d8267461e
@ -0,0 +1,42 @@
|
||||
From 87cc3d07ec7eb27c065920f0741e649f72b86acd Mon Sep 17 00:00:00 2001
|
||||
From: fritsch <peter.fruehberger@gmail.com>
|
||||
Date: Tue, 12 Feb 2013 22:29:27 +0100
|
||||
Subject: [PATCH] AE: make sure we reOpen when the flag is set or we run into
|
||||
trouble
|
||||
|
||||
---
|
||||
xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp | 15 +++------------
|
||||
1 file changed, 3 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
|
||||
index dc01abe..085ae30 100644
|
||||
--- a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
|
||||
+++ b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
|
||||
@@ -1055,21 +1055,12 @@ void CSoftAE::Run()
|
||||
{
|
||||
bool restart = false;
|
||||
|
||||
- /* Clean Up what the suspend guy might have forgotten */
|
||||
- // ProcessSuspending() cannot guarantee that we get our sink back softresumed
|
||||
- // that is a big problem as another thread could start adding packets
|
||||
- // this must be checked here, before writing anything on the sinks
|
||||
- if(m_sinkIsSuspended && m_sink)
|
||||
- {
|
||||
- CLog::Log(LOGDEBUG, "CSoftAE::Run - Someone has forgotten to resume us (device resumed)");
|
||||
- m_reOpen = !m_sink->SoftResume() || m_reOpen;
|
||||
- m_sinkIsSuspended = false;
|
||||
- }
|
||||
- if ((this->*m_outputStageFn)(hasAudio) > 0)
|
||||
+ /* with the new non blocking implementation - we just reOpen here, when it tells reOpen */
|
||||
+ if (!m_reOpen && (this->*m_outputStageFn)(hasAudio) > 0)
|
||||
hasAudio = false; /* taken some audio - reset our silence flag */
|
||||
|
||||
/* if we have enough room in the buffer */
|
||||
- if (m_buffer.Free() >= m_frameSize)
|
||||
+ if (!m_reOpen && m_buffer.Free() >= m_frameSize)
|
||||
{
|
||||
/* take some data for our use from the buffer */
|
||||
uint8_t *out = (uint8_t*)m_buffer.Take(m_frameSize);
|
||||
--
|
||||
1.7.10
|
||||
|
Loading…
x
Reference in New Issue
Block a user