How to check is an Audiopath is empty?

Started by
5 comments, last by jacksaccountongamedev 20 years, 4 months ago
I have been working with Direct Music, and I must know how to check if an Audiopath is empty... ie no 3D sound is playing on that Audiopath. Any help is apreciated.
Advertisement
You can''t You have to check the Performance interface to determine if a sound is playing.
I wish to create an array of Audiopaths, so that when I want to play a 3D sound I can locate an ''empty'' one and use it (was it you that told me that?). Is that possible?
Place the audiopaths on a stack and pop off the first one when you want to play a segment. Use segment notifications to signal when a segment has finished playing, and take the associated audiopath and push it back onto the stack.

[edited by - Mastaba on December 13, 2003 11:40:34 AM]
.
Mastaba - nice solution!
Thanks. I''ll get onto that. If I have enough Audiopaths then I wont even need to use segment notificaion to tell me when the sound has finished playing - just move it to the bottom as I play the sound. Better do it anyway though, just to be safe.
I have the system up and running using a linked list. I could take a Audiopath that is playing a sound and then stuff it on a seperate list, then move it back to the end of the main list when it is finished, but I really dont need to because I have enough Audiopaths on the list to simply move one to the back as I play a sound on it. Anyhow, given a situation where I was to play a sound on a Audiopath that already has something on it, nothing bad would happen - infact it is probably better that I cancel out the sound that is already playing for the new one. Making sense?
Just wonder, is it normal to use 3D sound in a 2D game? The player is a small soldier in the center of the screen, and the sound evolves around him. But the game is not seen from his point of view, it is seen from a distance. Therefore, it all seems kind of odd when playing. However, I have helped the situation by moving the listener back significantly to account for the camera being ''behind'' the 2D scene.
Thanks for all the help.

This topic is closed to new replies.

Advertisement