aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xbmc/cores/AudioEngine/Sinks/AESinkDARWINIOS.cpp5
-rw-r--r--xbmc/cores/AudioEngine/Sinks/AESinkDARWINOSX.cpp5
2 files changed, 8 insertions, 2 deletions
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkDARWINIOS.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkDARWINIOS.cpp
index c7d3d036a9..8814eaaca4 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkDARWINIOS.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkDARWINIOS.cpp
@@ -239,14 +239,17 @@ unsigned int CAAudioUnitSink::write(uint8_t *data, unsigned int frames)
CSingleLock lock(mutex);
unsigned int timeout = 900 * frames / m_sampleRate;
if (!m_started)
- timeout = 500;
+ timeout = 4500;
// we are using a timer here for beeing sure for timeouts
// condvar can be woken spuriously as signaled
XbmcThreads::EndTime timer(timeout);
condVar.wait(mutex, timeout);
if (!m_started && timer.IsTimePast())
+ {
+ CLog::Log(LOGERROR, "%s engine didn't start in %d ms!", __FUNCTION__, timeout);
return INT_MAX;
+ }
}
unsigned int write_frames = std::min(frames, m_buffer->GetWriteSize() / m_frameSize);
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkDARWINOSX.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkDARWINOSX.cpp
index cc380e3583..9d82b87c02 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkDARWINOSX.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkDARWINOSX.cpp
@@ -630,14 +630,17 @@ unsigned int CAESinkDARWINOSX::AddPackets(uint8_t *data, unsigned int frames, bo
CSingleLock lock(mutex);
unsigned int timeout = 900 * frames / m_format.m_sampleRate;
if (!m_started)
- timeout = 500;
+ timeout = 4500;
// we are using a timer here for beeing sure for timeouts
// condvar can be woken spuriously as signaled
XbmcThreads::EndTime timer(timeout);
condVar.wait(mutex, timeout);
if (!m_started && timer.IsTimePast())
+ {
+ CLog::Log(LOGERROR, "%s engine didn't start in %d ms!", __FUNCTION__, timeout);
return INT_MAX;
+ }
}
unsigned int write_frames = std::min(frames, m_buffer->GetWriteSize() / m_format.m_frameSize);