diff options
author | jmarshallnz <jcmarsha@gmail.com> | 2014-03-26 10:54:19 +1300 |
---|---|---|
committer | Trent Nelson <trent.a.b.nelson@gmail.com> | 2014-03-26 19:51:41 -0600 |
commit | 714e7f2c0d81371c02945ef80549a65f289fe4b7 (patch) | |
tree | de955535432713ae1456fc049ed6a8fc060117db | |
parent | 3d6c1dfdb5b836cc98ee4ba17ebdf824682829b1 (diff) |
Merge pull request #4471 from Memphiz/sinktimeout
[darwinsink] - increase the initial startup timeout of the sinks to 1900...
-rw-r--r-- | xbmc/cores/AudioEngine/Sinks/AESinkDARWINIOS.cpp | 5 | ||||
-rw-r--r-- | xbmc/cores/AudioEngine/Sinks/AESinkDARWINOSX.cpp | 5 |
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); |