Needed: audio.isSoundPlaying() function?

Is there a way to tell whether a specific sound is playing? I know there’s a way to tell of a channel is playing (audio.isChannelPlaying()), but that means that each sound would have to have a dedicated channel for me to use this function.

I was planning on setting things up so that sounds could be played on any open channel. Then I wanted to check to see if a sound is playing, and if not, start it. Or maybe check to see if it’s playing, and if so, fade it out.

Application would be in a comic book, using a modified version of the Corona comic book framework… On specific panels, I’d trigger a musical cue, ambient sound, and/or sound effect. I might want the same ambient sound to continue playing for 10 panels, and then switch to a different one.

If the reader is always moving forward through the panels, this is not too much of a problem since I’d know what sounds should be playing. Where it gets complex is if the player decides to go backwards a few panels, or if the game was resuming from a saved bookmark, or if we were to jump to a specific page/panel through a control panel.

Any suggestions? Is the only solution to assign each sound to its own channel and then make sure we don’t have more than 32 sounds in all? That might be possible in this specific app, but it would be great to have a lot more flexibility.

Thanks!
David
[import]uid: 9905 topic_id: 6185 reply_id: 306185[/import]