Sound
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
Try posting in the Music and Sound Forum since you aren''t getting much advice here as of yet...
-geo
red eye is coming back (the old site is still around, albeit in a weird transitional form)
-geo
red eye is coming back (the old site is still around, albeit in a weird transitional form)
You could use a good sound library like fmod. Get the library from the download section, and from there you can also find links to documentation and tutorials. The basic tutorial is a good place to start.
<< 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]
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]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement