Play .wav file then move to next window (ASAP please)

J

johnmmcparland

I recently came across some code to help play .wav;

http://www.codeguru.com/Csharp/Csharp/cs_graphics/sound/article.php/c6143/

and while I got this to work in a stand-alone application, I have been
unable to make it work in a bigger one.

My program has to play a sequence of .wav files when the play button is
clicked. Once it has finished doing so, I have to automatically move
on to a new window.

I have tried putting the code to actually play the files in its own
thread and waiting til this is finished, but unfortunately, the files
are never played.

Anyone tried this before (or anything similar)?

I need this answer ASAP
 
B

Bob Powell [MVP]

J

johnmmcparland

Thanks,

I found my problem was that my sound was muted! *goes red* I'm sure I
didn't do that but oh well, haha.

Anyway, for anyone else, since the UI was in a thread of its own, you
can play the sound file no problem, just use a
Thread.Sleep(maxTimeFileCanPlayFor) and you'll be fine.
 

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