PDA

View Full Version : sound



Dentist
03-15-2002, 02:34 PM
Does anyone know how to play a wave file. do i have to play sound in a seperate thread so as to not disrupt the graphics pipe ?

Omaha
03-15-2002, 03:11 PM
Yes, but my response would be off topic.

reubenhawkins
03-15-2002, 03:11 PM
Use the function PlaySound() in windows. You'll have to pass SND_ASYNC as one of the parameters. That will cause the sound to play in the background and processing will resume. Also, I think if you pass
SND_ASYNC | SND_LOOP it will play untill you call the function again and pass SND_STOP, but I'm not sure on that one. This function is defined by #include "mmsystem.h".

nexusone
03-15-2002, 05:40 PM
You have a few options other then the windows sound function.
There are a few cross platform sound API's.
openAL Open Audio.
FMOD API: play wav, mp3's, MOD,STM etc.
BASS API: Play's wav, mp3's
SDL API
Any will give you what you are looking for, then play the sound on a there our thread.
Most of then support 3D sound effects, direct sound support, etc.


Originally posted by Dentist:
Does anyone know how to play a wave file. do i have to play sound in a seperate thread so as to not disrupt the graphics pipe ?