I’ve tried this but I’m interested in playing sound from where my program starts. Such I have the .wav file inside of the project folder.
SoundPlayer simpleSound = new SoundPlayer(@"/yay.wav");
simpleSound.Play();
Thank you
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is probably your problem.
When you compile your application, it doesn’t end up straight in the project folder – it ends up in a subdirectory (either
/Debug/binor/Release/bin). Put the wav file there instead of in the project directory and see how that works.