On Aug 18, 2005, at 10:26 PM, cnmmd wrote:
why the event_handle is signaled state?
I only find this time to setevent: void CALLBACK callback(HWAVEOUT handle, UINT message, DWORD data, DWORD param1, DWORD param2) { WAVEHDR *header; struct buffer *buffer;
switch (message) { case WOM_DONE: header = (WAVEHDR *) param1; buffer = (struct buffer *) header->dwUser; if (SetEvent(buffer->event_handle) == 0) {
... }
That's it. This callback routine is passed to waveOutOpen(), which allows it to be called asynchronously after each data block sent via waveOutWrite() has finished playing.