I'm using Microsoft Visual C++ 2008. How would i play a sound file? Either .wav, .mp3, or .midi hopefully.
nokeekon
0
Newbie Poster
Recommended Answers
Jump to PostIf you want a good deal of control over the sound, you might want to consider DirectSound (though using it can be very annoying and complex). If not, I believe there is a simple Windows function that you can use to play sounds asynchronously, but I can't remember it on …
Jump to PostI really need the Windows function to play it.
Here you go:http://msdn.microsoft.com/en-us/library/ms712879.aspx
Read the entire page to learn how to play it asynchronously (i.e., the program continues on as the sound plays).
Jump to PostDoesn't seem to work. Umm... i guess what i'm really looking for is an example to play a sound file while the user is going through the program and an example that would stop the sound.
Maybe you tried it the wrong way, the following plays a .wav file
All 11 Replies
ivailosp
11
Junior Poster
CoolGamer48
65
Posting Pro in Training
ivailosp
11
Junior Poster
nokeekon
0
Newbie Poster
CoolGamer48
65
Posting Pro in Training
nokeekon
0
Newbie Poster
marco93
-87
Junior Poster
mitrmkar
1,056
Posting Virtuoso
CoolGamer48
65
Posting Pro in Training
nokeekon
0
Newbie Poster
CoolGamer48
65
Posting Pro in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.