Playing Multiple Wave Files
anybody know how to do this?
lets say i have a sound playing and i impliment it with this:
sndPlaySound("mysound.wav", SND_ASYNC | SND_LOOP);
and that will continuosly play in the background...
now what if i have another wave.. like birds chirping.. how do i play the bird sound without quitting the background sound?
Why would you have to stop the first sound?
"I was big when I was little!"
--William "The Refrigerator" Perry (Former Chicago Bears star)
BASSOFeeSH@onebox.com
><>
"I was big when I was little!"
--William "The Refrigerator" Perry (Former Chicago Bears star)
BASSOFeeSH@onebox.com
><>
when i play the new sound, the first one stops by itself.
im wondering if there is any tricks to play to waves at the same time
im wondering if there is any tricks to play to waves at the same time
(SND_ASYNC | SND_LOOP) is C++
if it were visual basic it would be something like
(SND_ASYNC or SND_LOOP)
if it were visual basic it would be something like
(SND_ASYNC or SND_LOOP)
ok let me start over here.
sndPlaySound("mysound.wav", SND_ASYNC | SND_LOOP);
that is C++
how do you play multiple sounds in C++ on a windows machine.
after i execute this command, the sound starts playing asynchronously on a eternal loop. Now, how do i play another sound ontop of that sound without making the one thats allready playing stop.
thanks!
sndPlaySound("mysound.wav", SND_ASYNC | SND_LOOP);
that is C++
how do you play multiple sounds in C++ on a windows machine.
after i execute this command, the sound starts playing asynchronously on a eternal loop. Now, how do i play another sound ontop of that sound without making the one thats allready playing stop.
thanks!
You can''t do it with PlaySound, the WinAPI doesn''t support software or hardware mixing of sounds. You''ll have to use DirectSound or OpenAL (btw: anyone know any OpenAL tutorials?).
http://www.gdarchive.net/druidgames/
http://www.gdarchive.net/druidgames/
http://search.excite.com/search.gw?search=OpenAL
try that.. thats just a search result from the excite search engine...
thank you, null and void, for answering me! =)
try that.. thats just a search result from the excite search engine...
thank you, null and void, for answering me! =)
After some research, i finnaly downloaded the DirectX7 SDK.
I took all the important DX7 sound classes and threw them all into one easy-to-use class.
So if anyone wants an easy-to-use class to play multiple sound files in directx7 for C++ go here:
http://www.planetsourcecode.com/xq/ASP/txtCodeId.1101/lngWId.3/qx/vb/scripts/ShowCode.htm
thanks to everyone for answering my questions!
I took all the important DX7 sound classes and threw them all into one easy-to-use class.
So if anyone wants an easy-to-use class to play multiple sound files in directx7 for C++ go here:
http://www.planetsourcecode.com/xq/ASP/txtCodeId.1101/lngWId.3/qx/vb/scripts/ShowCode.htm
thanks to everyone for answering my questions!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement