471,570 Members | 1,305 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,570 software developers and data experts.

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

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

http://www.codeguru.com/Csharp/Cshar...cle.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

Dec 20 '05 #1
2 1600
See the article in Windows Forms Tips and Tricks.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

<jo************@googlemail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
I recently came across some code to help play .wav;

http://www.codeguru.com/Csharp/Cshar...cle.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

Dec 20 '05 #2
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.

Dec 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by matt dittman | last post: by
reply views Thread by laredotornado | last post: by
9 posts views Thread by Jonny | last post: by
10 posts views Thread by Robert | last post: by
14 posts views Thread by v4vijayakumar | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by lumer26 | last post: by
reply views Thread by lumer26 | last post: by
reply views Thread by lumer26 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.