[Openal-devel] Fix mixer sleeping for Windows
Chris Robinson
chris.kcat at gmail.com
Thu Jul 19 03:50:46 PDT 2007
Under Windows sleeping is done with Sleep, which takes millisecond values,
while the wrapper _alMicroSleep takes microseconds. The wrapper simply
divides the value to get milliseconds, however when given a value of 1 the
call becomes Sleep(0), which only yields the CPU but returns immediately if
nothing else is waiting.. which leads to unrelenting CPU usage and the
inability for other threads to acquire certain locks.
This patch makes sure the CPU is given up between loop iterations.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0014-Sleep-1-millisecond-in-the-mixer-not-1-microsecond.patch
Type: text/x-diff
Size: 797 bytes
Desc: not available
Url : http://opensource.creative.com/pipermail/openal-devel/attachments/20070719/a2f1d84e/0014-Sleep-1-millisecond-in-the-mixer-not-1-microsecond.bin
More information about the Openal-devel
mailing list