"Is Playing" vs Event Lifespans

(Alec Brady) #1

When a component is played, does the “Is Playing” have anything to do with the audio asset length?

For example if one character is speaking and another must speak afterwards and not interrupt, the “Is Playing” function does not seem to launch the second sample correctly.

This is specifically using programmer sounds - the profiler seems to show the event lifespan as being much longer that the audio asset.

(Geoff Carlton) #2

IsPlaying will return true if the event is still playing. If the event is still making sound then it will still be playing.

Programmer sounds are a bit more complicated because the sound length can vary. So if you stretch out a programmer sound on the timeline with a 10 second span, but play a 2 second programmer sound, then the event will still play for 10 seconds before stopping.

There is a workaround for this by using a sidechain to loop the timeline until the programmer sound has stopped making sound. The Studio examples project has an event with that workaround.

(Alec Brady) #3

Great! Thank you.