Skip to content

Commit

Permalink
[osx] fixed, add a delay before audio renderer encoding init passthou…
Browse files Browse the repository at this point in the history
…gh and using adjust refresh rate
  • Loading branch information
davilla committed Dec 9, 2011
1 parent 8b9fc03 commit ea07d6a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions xbmc/cores/AudioRenderers/CoreAudioRenderer.cpp
Expand Up @@ -475,6 +475,16 @@ bool CCoreAudioRenderer::Initialize(IAudioCallback* pCallback, const CStdString&
// If this is a passthrough (AC3/DTS) stream, attempt to handle it natively
if (bPassthrough)
{
if (g_guiSettings.GetBool("videoplayer.adjustrefreshrate"))
{
int delay = g_guiSettings.GetInt("videoplayer.pauseafterrefreshchange");
if (delay < 2)
delay += 20;
CLog::Log(LOGDEBUG, "CoreAudioRenderer::Initialize: "
"delay(%d seconds) audio init for adjust refresh rate when passthrough",
delay/10);
Sleep(delay * 100);
}
m_Passthrough = InitializeEncoded(outputDevice, uiSamplesPerSec);
// TODO: wait for audio device startup
Sleep(100);
Expand Down

0 comments on commit ea07d6a

Please sign in to comment.