gazza67 wrote:
Does anyone know how to check for when a sound has finished playing?
I am currently using the SoundPlayer, there doesnt seem to be any
event for this - am I missing something?
I believe you can call PlaySync() and that will not return until the
sound has finished. If you want async behavior while knowing when the
sound has finished playing, then use a worker thread to actually do the
PlaySync() call, and raise an event or otherwise signal when the
PlaySync() method returns in that thread.
There are more complicated solutions using DirectSound or the WinMM
stuff (via p/invoke), but I think the above should work.
Pete