Skip to main content
gamedev.net
🔒 Locked

Playing Sounds

Started by Starwind8748 1 reply 400+ views
Original Post
Starwind8748
Starwind8748
I use this command in C++ that looks like this: PlaySound ("wavfile.wav",NULL AYSNC_.....\...); I forgot the rest but thats pretty much it. Is there any command like this one that will allow me to play multiple sounds at once?
a person
a person
if running win98 or higher, you should be able to use that function since windows automagically will mix things if your driver supports it (most do).

though i suggest learning directsound.

fyi: playsound is a part of the win32 api, not c/c++.
SimDemon
SimDemon
Yes! It''s called mciSendString()! Use it like this:

mciSendString(
"wavfile.wav",
NULL, NULL, NULL
);
mciSendString(
"wavfile2.wav",
NULL, NULL, NULL
);

// That Will Play Both Sounds
// At The Same Time
I'll have a link to the TriFaze website as soon as possible. It's still currently being designed, by myself of course! =) I'll update the URL and my signature as soon as possible.Feel free to send me a message on Yahoo! or AOL IM™. =)

Topic Locked

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

Sign in to reply to this topic.