diff options
author | Chris Robinson <[email protected]> | 2012-01-20 12:06:31 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-01-20 12:06:31 -0800 |
commit | 2b2ce8bf3b89793f0bd555675eccc89875b8e8a2 (patch) | |
tree | adffcb212d046df366384b6185805a071713c73b | |
parent | 47c8c15878fbe66f8c3f20588c807388f53dd847 (diff) |
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.
-rw-r--r-- | Alc/backends/winmm.c | 14 |
1 files 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); } /* |