Commit 4c8ed8d1 authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

xaudio2: Don't keep running after master voice is destroyed.

parent f326e372
......@@ -1188,6 +1188,8 @@ static void WINAPI XA2M_DestroyVoice(IXAudio2MasteringVoice *iface)
return;
}
This->running = FALSE;
IAudioRenderClient_Release(This->render);
This->render = NULL;
......@@ -3068,11 +3070,13 @@ static DWORD WINAPI engine_threadproc(void *arg)
if(This->stop_engine)
break;
if(!This->running)
continue;
EnterCriticalSection(&This->lock);
if(!This->running || !This->aclient){
LeaveCriticalSection(&This->lock);
continue;
}
do_engine_tick(This);
LeaveCriticalSection(&This->lock);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment