I have a WPF application (not a game) that is utilising the XACT software, and I have many different cues that get played on certain stop/start events.
When the Stop events occur, I stop the cue associated with the Start event that played the cue, via an
IDictionary<UserObject, Cue> implementation.
You can think of it like this:
| public void Startevent(UserObject obj) |
| { |
| //...get cue... |
| _cues.Add(obj, cue); |
| } |
| |
| public void StopEvent(UserObject obj) |
| { |
_cues[obj].Stop();
_cues[obj].Dispose();
_cues[obj] = null;
_cues.Remove(obj) |
| } |
| |
However, I cannot guarantee that the Stop event will get fired, (well I think thats the issue), and sometimes, there is a cue playing that should have stopped, but is still playing. I have debugged, and I know that it is not in the _cues collection either, but somehow its still playing (my cues repeat over and over).
Is there a section of the API that I have not seen that will allow me to get all playing cues, check if they
should be playing, and stop them if they should not be?
Cheers,
Mark