Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Rnoodles

Sound

This topic is 5438 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve been trying to find out how to play wav files in a program. I looked on a few programming websites, and I looked through the dsound.h file. I haven''t found any effective ways to play a wav. (one guy told me to do system("mywav.wav") Thanks! _NOOODLES

Share this post


Link to post
Share on other sites
Advertisement
<< I've been trying to find out how to play wav files in a program. >>

Couple of options. If you don't need to mix sounds, then you can use PlaySound() which is part of Windows. Look up the parameters for that function. Problem is once a new sound plays, the other one is cut off. So only one WAV sound at a time here. You can play WAV as a file, or as a resource (inside the EXE).

Another option is FMOD, mentioned above.

Another option is using DirectSound from DirectX 6. I use straight C style calls. My demo below which plays as a resource (you can also play WAV as a file).

DirectSound Demo C Source

DirectSound Demo EXE

You'll also need to #include

dsutil.h and dsutil.cpp

with your project.

Phil P

[edited by - PhilVaz on July 6, 2003 4:07:05 AM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!