From 2b2ce8bf3b89793f0bd555675eccc89875b8e8a2 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 20 Jan 2012 12:06:31 -0800 Subject: [PATCH] Always message the WinMM processing thread when a buffer is done So the processing thread can keep track of completed buffers when shutting down, too. --- Alc/backends/winmm.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/Alc/backends/winmm.c b/Alc/backends/winmm.c index 4b5941b1..7a9a0e01 100644 --- a/Alc/backends/winmm.c +++ b/Alc/backends/winmm.c @@ -160,13 +160,8 @@ static void CALLBACK WaveOutProc(HWAVEOUT hDevice,UINT uMsg,DWORD_PTR dwInstance if(uMsg != WOM_DONE) return; - // Decrement number of buffers in use InterlockedDecrement(&pData->lWaveBuffersCommitted); - if(pData->bWaveShutdown == AL_FALSE) - { - // Notify Wave Processor Thread that a Wave Header has returned - PostThreadMessage(pData->ulWaveThreadID, uMsg, 0, dwParam1); - } + PostThreadMessage(pData->ulWaveThreadID, uMsg, 0, dwParam1); } /* @@ -234,13 +229,8 @@ static void CALLBACK WaveInProc(HWAVEIN hDevice,UINT uMsg,DWORD_PTR dwInstance,D if(uMsg != WIM_DATA) return; - // Decrement number of buffers in use InterlockedDecrement(&pData->lWaveBuffersCommitted); - if(pData->bWaveShutdown == AL_FALSE) - { - // Notify Wave Processor Thread that a Wave Header has returned - PostThreadMessage(pData->ulWaveThreadID,uMsg,0,dwParam1); - } + PostThreadMessage(pData->ulWaveThreadID,uMsg,0,dwParam1); } /*