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

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.
 
N

Nicholas Paldino [.NET/C# MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top