How to know when SecondaryBuffer.Play() is done?

  • Thread starter Thread starter Sin Jeong-hun
  • Start date Start date
S

Sin Jeong-hun

Microsoft.DirectX.DirectSound.SecondaryBuffer buff=new ...
....
buff.Play(0,data,BufferPlayFlags.Default);

The play method seems to be asynchronous. Then how can I know when it
finished playing the sound? I looked for some event, but there's
nothing but Disposed events.
 
It doesn't look like there is an event that you can subscribe to which
would tell you this. The only way I can think of doing this is poll the
GetCurrentPosition method to determine where in the buffer the item being
played is at.
 
Back
Top