Skip to main content
GameDev.net gamedev.net
🔒 Locked

about PlaySound( ) problem

Started by nightkey Mar 20, 2003 at 7:36 PM 4 replies 450+ views
Original Post
nightkey
nightkey
Can we use PlaySound( ) to play more than one wav file simultaneously? If yes, please show me. Else, please recommend other way... thanks so much !!
niyaw
niyaw
no. mci is the easiest way to play multiple sounds simultaneously.
llvllatrix
llvllatrix
Not an expert on sound but i suggust that you go with a sound library like fmod or openal or bass. That way you can easily expand you sound capabilities when you need to. A tutorial on fmod can be found on www.gametutorials.com. I also suggust you write a wrapper for the sound interface. That way you can easily change between dlls when you need to (you probably wont but...) and it keeps your code clean by encapsulating all the setup. I have a (simple) fmod wrapper if you want, email me and ill get it to you: thereisnocowlevel@hotmail.com.
code_evo
code_evo

fmod is a great library. Its has decent documentation, and its compatible with pc, mac, ps2, xbox + more!


Qa303asmGuru
Qa303asmGuru
Well if you just need to play more than one wav file at the same time, I just use:

IDirectMusicPerformance8:: PlaySound(params) or PlaySoundEx(params)

Works like a charm for me.

-Q

EDIT: I guess I should have been a little more clear. I call this function repeatedly and it will play a new instance of the wav file every time, regardless if one is already playing.

[edited by - qa303asmguru on March 20, 2003 11:28:43 PM]
nightkey
nightkey
well, I dont understand about this code...
IDirectMusicPerformance8:: PlaySound(params)
Should we declare anything before using this function?
I am using VC++ 6.0 and it gave me error message when I tried to put it in my code.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.