Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[WIN32] fixed compilation

  • Loading branch information...
commit 455710e7f96b9cdf383e8577fc4fd6b167b064b9 1 parent 3f2c26b
wsoltys authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 xbmc/cores/AudioEngine/Sinks/AESinkNULL.cpp
View
4 xbmc/cores/AudioEngine/Sinks/AESinkNULL.cpp
@@ -135,7 +135,11 @@ void CAESinkNULL::Process()
// The object has been created and waiting to play,
m_inited.Set();
// yield to give other threads a chance to do some work.
+#ifdef TARGET_WINDOWS
+ Sleep(0);
+#else
sched_yield();
+#endif
SetPriority(THREAD_PRIORITY_ABOVE_NORMAL);
while (!m_bStop)

2 comments on commit 455710e

@ace20022
Collaborator

I'm really not sure and excuse me if I'm wrong, but sched_yield() is only used in
XTimeUtils.cpp :

#ifdef _LINUX

void WINAPI Sleep(DWORD dwMilliSeconds)
{
#if _POSIX_PRIORITY_SCHEDULING
  if(dwMilliSeconds == 0)
  {
    sched_yield();
    return;
  }
#endif

  usleep(dwMilliSeconds * 1000);
}

So I guess Sleep(0) is sufficient.

@wsoltys
Collaborator

good catch

Please sign in to comment.
Something went wrong with that request. Please try again.