Multiple sounds?
by Law Rus · in Technical Issues · 01/22/2008 (4:51 pm) · 1 replies
I've had a lot of issues when trying to play several sounds at once. I can play roughly 3 sounds at the same time, any more than that don't get played for some reason. I know this has often come up but every thread I've searched through doesn't have a solution.
Currently all I use is the alxPlay() function. I have tested using different channels as well as many other things. What would you guys recommend?
I'm using 1.6 TGB Indie.
Currently all I use is the alxPlay() function. I have tested using different channels as well as many other things. What would you guys recommend?
I'm using 1.6 TGB Indie.
About the author
Torque Owner Law Rus
I converted all my sound files to .ogg (which really cuts back on file size too) and found that a few sound effects had a slow quiet ring out to them. To quiet to hear during the game with background music on, so I cut them down reducing the length each sound is played for.
I'm still getting problems with sounds not playing but I can play more at the same time without problem.
I was reading about channels and found in one of the examples someone used
$channel = 0;
and then used
type = $channel;
to refer to it in their type. What exactly is the 0? I'm assuming if I used other numbers I could separate the sounds to different channels.
What I don't understand is what effect that would have. Currently I've used the: $DefaultAudioType, $GuiAudioType, $SimAudioType and $MusicAudioType in a hope to get rid of the sound problem. I still don't understand the need for them.