Skip to content
This repository
Browse code

[WIN32] fixed compilation

  • Loading branch information...
commit 455710e7f96b9cdf383e8577fc4fd6b167b064b9 1 parent 3f2c26b
wsoltys authored February 19, 2013
4  xbmc/cores/AudioEngine/Sinks/AESinkNULL.cpp
@@ -135,7 +135,11 @@ void CAESinkNULL::Process()
135 135
   // The object has been created and waiting to play,
136 136
   m_inited.Set();
137 137
   // yield to give other threads a chance to do some work.
  138
+#ifdef TARGET_WINDOWS
  139
+  Sleep(0);
  140
+#else
138 141
   sched_yield();
  142
+#endif
139 143
 
140 144
   SetPriority(THREAD_PRIORITY_ABOVE_NORMAL);
141 145
   while (!m_bStop)

2 notes on commit 455710e

Andreas Zelend
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.