Avoid tight loop in DirectSound thread worker
This commit is contained in:
parent
1edbc208e5
commit
9c4277ae9b
|
@ -525,9 +525,10 @@ static void dsound_thread_worker(LPVOID nullPtr)
|
||||||
{
|
{
|
||||||
SetThreadAffinityMask(GetCurrentThread(), g_CPUOthers);
|
SetThreadAffinityMask(GetCurrentThread(), g_CPUOthers);
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
Sleep(0);
|
Sleep(1);
|
||||||
DSoundMutexGuardLock;
|
|
||||||
|
DSoundMutexGuardLock;
|
||||||
|
|
||||||
vector_ds_stream::iterator ppDSStream = g_pDSoundStreamCache.begin();
|
vector_ds_stream::iterator ppDSStream = g_pDSoundStreamCache.begin();
|
||||||
for (; ppDSStream != g_pDSoundStreamCache.end(); ppDSStream++) {
|
for (; ppDSStream != g_pDSoundStreamCache.end(); ppDSStream++) {
|
||||||
|
|
Loading…
Reference in New Issue