Solved Is there a plugin/trigger to check when an Audio ends?

pinosante

Well-known member
Messages
393
Reactions
519
Points
93
I have a voiced line, and after the line is spoken I want to continue the scene. Is there a trigger which waits until the queue of some audiosource is empty, or the clip finished playing?
 
Bare in mind ive not worked with this program as long as other people here but you can get an overly complex system of a timer+counter that ticks down, with the audio triggering a +1 to the counter.
So "audio trigger" somewhere can do things when audio reaches a level - uh i cant explain this very well - in the audio tab of VAM you can have things that work when the audio volume reaches a level - down the bottom of the window, audio multiplier etc.
If you add Logic bricks (timer countdown etc) and have it so the first audio file triggers "disable" of the sequence or whatever, and the audio triggers a +1 to the counter, and the timer constantly -1 to the counter, and when counter=0 re-enable the sequence.
Basically, when audio is playing it keeps the counter above 0, by volume etc. As soon as no noise is produced, there is no audio trigger and the counter is allowed to finish, and reaching 0 it renables your sequence to play the next file or whatever.

There is probably a REALLY easy way to do this - but im going by what ive found out for myself and what ive read on here. Also tired so please excuse wall of text.
 
Upvote 0
Your idea is solid, except for songs which have complete silence in the middle, or, unfortunately, my use case: speech clips which will have silences between the words.
I do thank you for coming up with this clever workaround!
 
Upvote 0
Can you simply trigger the voice audio on it's own animation in timeline that is the length of the audio clip, then you can sequence the next animation to play after it is finished?
 
Upvote 0
LogicBricks has a "EventAudioQueueEmpty" brick. I think that's what you are looking for:
  • EventAudioQueueEmpty: Brick that triggers when an AudioSource did run out of audio to play. Needs to be placed on a Person, AudioSource, RhythmAudioSource or AptSpeaker atom.
 
Upvote 0
Back
Top Bottom