aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-01-20 12:06:31 -0800
committerChris Robinson <[email protected]>2012-01-20 12:06:31 -0800
commit2b2ce8bf3b89793f0bd555675eccc89875b8e8a2 (patch)
treeadffcb212d046df366384b6185805a071713c73b /Alc
parent47c8c15878fbe66f8c3f20588c807388f53dd847 (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.
Diffstat (limited to 'Alc')
-rw-r--r--Alc/backends/winmm.c14
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);
}
/*