Posted on 1997-04-24
I wrote the following Callback-Function in order to
add the filled buffer, which is returned by the driver, again to drivers queue. I don't know why it doesn't work.
The driver stopps recording when the buffer is filled.
I would be verry glad if you could help me.
void CALLBACK __export WaveProc(
HWAVE hWave, // handle of waveform device
UINT uMsg, // sent message
DWORD dwInstance, // instance data
DWORD dwParam1, // application-defined parameter
DWORD dwParam2 // application-defined parameter
LPWAVEHDR lpWaveHdrTemp = (LPWAVEHDR) dwParam1;
if( uMsg == WIM_DATA)
waveInUnprepareHeader((HWAVEIN) hWave, lpWaveHdrTemp ,sizeof(WAVEHDR) ) ;
waveInPrepareHeader((HWAVEIN)hWave, lpWaveHdrTemp, sizeof(WAVEHDR));
waveInAddBuffer((HWAVEIN)hWave, lpWaveHdrTemp, sizeof(WAVEHDR));