How to play all sounds in a cue in a row?
How to play all sounds in a cue in a row?
I've just started with XNA. I've added multiple .wavs into a wave bank then I created a cue and added all sounds to it. Now I want to play them in a row.
I've set the property Ordered, etc. but when I call m_Cue.Play(); only the first sound is played.
[300 byte] By [
Zingam] at [2008-2-22]
A cue instance when triggered will play only one of it's sound variations. To play the same cue with a different sound variation you need to prepare and play another instance of this cue (pass in the same cue index to IXACTSoundBank::Prepare).
You can also play cues by just calling IXACTSoundBank::Play. In a way, you can think of this call as providing a single method to prepare and play the cue. This method also let's you play a cue as a "fire and forget" cue. A fire and forget cue is useful for playing sounds where you're not interested in getting the cue instance back. The XACT runtime engine will destroy these f&f cues as soon as they finish playing. This reduces your overhead of managing the cue instances. To play a cue as a fire and forget cue just call IXACTSoundBank::Play passing in the cue index and NULL for the returned cue ptr.
Hope this helps!
Ashu Tatake - Game Audio Team - Microsoft Corp.
This posting is provided "as is" with no warranties, and confers no rights