# Can I make a Cue in XACT to play two sounds?

I have my gun shot and reload sounds with their own cues, can I create a cue that points to both of them so they are played one after the other when playing the cue?

I would have tried the documentation but: Where is the XACT documentation?

UPDATE:

The documentation now found says:

A cue allows a game programmer to play sounds. It is composed of one or more sounds, and is referenced through a sound bank.

and:

...XACT enables audio designers ... to create transitions between cues

So my hunch was correct! But still cannot find how to do it. Why why doesnt the tool come with a comprehensive manual? whats the point in creating it if you dont tell people how to use it!!??

Not that I know of, unless you can do that from within the XACT editor GUI, which should be obvious considering how basic it is? (I'll check it out later tonight)

I would create a reference/instance or whatnot to a soundeffect and play that, using the audio engine setup, and check each update if the effect has stopped playing - if so, it's reached the end so start playing the second one. Simple but kludgy ^^

I don't think you can do it in XACT (not sure though) but a possible workaround would be to use audacity or some other tool to merge the sounds into a single file which might make sense if they will always be played together.

• yes yes, i know I could merge the sounds myself, im just checking XACT hasnt got this covered already. – markmnl Aug 9 '12 at 0:55
• see update in question – markmnl Aug 9 '12 at 1:06

Looks like to play them one after other you would call

GetCue ("sound1") GetCue ("sound2")

as describe here

But you will need to set up, AudioEngine, SoundBank and WaveBank first.

UPDATE

Bit of pseudo code.

Play Sound
Keep Reference to Cue
Every Update
check if is playing
when false play next one


Hope this helps

UPDATE2

From this image I am going to say that yes it is possible to have multiple sounds in a single cue but not to play at the same time they are played based on a probability.

• yeah - i know i could do that - it just seems there is some way to create a single cue to take care of playing diff sounds for me in XACT I just cannot figure out how – markmnl Aug 8 '12 at 14:12
• @Fëanor What gives you that impression?, as far as I can see a cue is unique to the getCue for a sound which you can use to play that one sound multiple times, there is also PlayCue, which I would guess is like saying, GetCue("sound").play(); – AbstractChaos Aug 8 '12 at 14:17
• Or something like this? – AbstractChaos Aug 8 '12 at 14:20
• i have no problem doing it myslef in code. What gives me that impressions is Cues in XACT are designed to play the same sounds different ways - what i am trying to do is a logical extension of that. – markmnl Aug 9 '12 at 0:54
• @Fëanor you may need to extend it yourself by the looks of it. – AbstractChaos Aug 9 '12 at 9:42

You can do something functionally equivalent in XACT if your willing to make one more sound.

Put both TRACKS into one SOUND, and have your cue play that sound. They both play at the same time now, so we have to delay one. In the tree on the right side of the sound bank editor, click on "Play Wave" and look at the properties on the lower left side of the screen. The "Time Stamp" allows you to delay the playing of a track, so you can delay the reload track to play after shoot track.

I know this is an old question, but I needed to do something similar with my game's soundtrack, and thought I should post the answer online since it's not clear at all.