473,326 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 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 1664
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: matt dittman | last post by:
I have created a windows service that reads emails from a drop directory and moves them to the appropriate mail folder every 15 seconds. I can move, rename and delete the files as needed, up...
7
by: Brian Sabolik | last post by:
I'm not sure if I've broken any Object Oriented rules or not, but ... I have projects in 2 different solutions that need to use each other's methods. Therefore I may have an "update" method in...
0
by: laredotornado | last post by:
Hello, I want to play an audio file by clicking on an audio icon and not having the page switch out underneath. Right now the code I have is ... <html> <head> <title>Dictionary:...
9
by: Jonny | last post by:
Hi, Please could you tell me what the quickest way would be to verify that a line of text exists in a file. I would like to be able to do something like: grep "^line of text$" filename.txt...
10
by: Robert | last post by:
I have an app that was originally 1.1, now migrated to 2.0 and have run into some sporadic viewstate errors...usually saying the viewstate is invalid, eventvalidation failed or mac error. My web...
9
by: Morris Neuman | last post by:
Im working with VS 2005 and trying to use a Hyperlink field in a datagrid to play a wave file that is not located in the website folders but is in a plain folder on the same machine, windows 2003...
7
by: ApexData | last post by:
Hello I currently Link the FE/BE using the LinkTables Option and the Linked Table Manager. Any time I need to move the BE to another location, I have to go through this process over again. I...
5
by: | last post by:
Hello, I am wrtting a program that does some sound effects... the files are stored in a subfolder in the application folder... and I check the existence of the files before calling the method to...
14
by: v4vijayakumar | last post by:
In computer based, two player, board games, how to make computer play? Are there any formal ways to _teach_ computer, to choose best possible move? I know this is kind of off-topic here. Please...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.