-
Play Sound in a game..
hi,
i'm making the game battleship..and i have used the playsound function to include .wav files in my program...
for example...an explosion when a ship is hit, etc.
BUT i wanted to know how to use this function to have say a song play the entire duration of the program. I assume theres a way and it would just loop the song over and over again correct?
If someone can help me w/ this it would be great!
i use windows XP, and microsoft.net console applications in C++.
THANKS!
BBNERD
-
I would have given a proper response, but you cross-posted. Don't do it next time :mad:
-
i'm sorry won't happen again
i realized after i did it that the post would be better for gaming board...SORRY!
BBNERD
-
Vanished just asked this question a couple days ago.
-
i know this, i'm friends w/ vanished...my question is a little different..maybe i didnt' explain it enough..
i want to have say a song play throughout the whole program..and loop over and over. The problem is, there are other sounds that may interrupt this original sound.
What i need to know is if there is a way to still loop that song over and over and also have other sounds occur during that same time slot?
HELP!
BBNERD
-
Whats wrong with
play_sound(file,SND_SYNC) and
play_sound(songfile,SND_LOOP | SND_ASYNC)? The only problem with that I know is that play_sound only play .wav files.
-
Could you post how you're using PlaySound(); ???
You should be able to play a sound without intterupting
the other sound(s)