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.
This commit is contained in:
Chris Robinson
2012-01-20 12:06:31 -08:00
parent 47c8c15878
commit 2b2ce8bf3b
+2 -12
View File
@@ -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);
}
/*