Re: Re: Re: [madplay]:audio_win32.c::struct buffer.event_handle: Can not find the time that sets the event object to the signaled state (Rob Leslie)

Rob Leslie <[email protected]> Fri, 19 Aug 2005 18:40:10 -0700
Newsgroups gmane.comp.audio.mad.devel
Message-ID <[email protected]>
On Aug 19, 2005, at 6:04 PM, cnmmd wrote:
>> 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.
>
> -------->yes, This callback routine will to be called  after each  
> data block sent via [waveOutWrite()] has finished playing. but  
> after waveOutOpen(),the callback do nothing.the event object is  
> nonsignaled also.

I don't understand what your question is. The event object is  
initially nonsignaled. It becomes signaled after waveOutWrite()  
finishes playing the data block associated with it. The main thread  
waits for the event object to become signaled before reusing the data  
block.

Are you puzzled because the event object is nonsignaled before  
waveOutWrite() is first called? The event object is not checked  
unless the data block is currently being used for playback (buffer- 
 >playing).

-- 
Rob Leslie
[email protected]