How to determine what music cue is playing?

(capybara) #1

Is there a call of sorts (or some other method) that our programmers can make to verify what cue is currently playing (and that it’s still playing an actual audio file and hasn’t gone into the ‘stop’ state of a segment)? We’re trying to make sure that if cue A is currently playing and another call to play cue A is made, that we can block this re-triggering from happening (so that cue A doesn’t re-start). Our understanding is that we can find out what ‘segment’ is playing, but not what cue is playing.

One way that we’re thinking of doing this is to take note of the last cue triggered. Then, when the next cue trigger occurs, we can check to see if it’s the same cue. We would also check to see if a ‘segment’ is currently playing, in order to verify if the last triggered cue is actually still playing an audio file, since it’s possible that the last triggered cue ended a long time ago. We don’t plan to have any links/connections between themes, so it’s pretty safe for us to assume that the theme for Cue A doesn’t transition into the theme for Cue B or any other themes.


(Andrew Scott) #2

There’s no API to query what cue is currently playing so you’d have to keep track of this on your side. MusicSystem::setCallback might be helpful here too.

(capybara) #3

Thanks, Andrew.