From 9d8267461e31ec5847020bafe89f2e50939b9d08 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Wed, 13 Feb 2013 00:15:36 +0100 Subject: [PATCH] xbmc: add another AE fix Signed-off-by: Stephan Raue --- ...e_flag_is_set_or_we_run_into_trouble.patch | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 packages/mediacenter/xbmc/patches/xbmc-990.11-AE-make_sure_we_reopen_when_the_flag_is_set_or_we_run_into_trouble.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-990.11-AE-make_sure_we_reopen_when_the_flag_is_set_or_we_run_into_trouble.patch b/packages/mediacenter/xbmc/patches/xbmc-990.11-AE-make_sure_we_reopen_when_the_flag_is_set_or_we_run_into_trouble.patch new file mode 100644 index 0000000000..cb55387336 --- /dev/null +++ b/packages/mediacenter/xbmc/patches/xbmc-990.11-AE-make_sure_we_reopen_when_the_flag_is_set_or_we_run_into_trouble.patch @@ -0,0 +1,42 @@ +From 87cc3d07ec7eb27c065920f0741e649f72b86acd Mon Sep 17 00:00:00 2001 +From: fritsch +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 +