How do I get the current playback position (secs or ms) of a playing sound cue?
Surely there must be a way.
(comments are locked)
|
Be the first one to answer this question
Follow this question
Once you sign in you will be able to subscribe for any updates here
you need to use an audio component to play the sound then use the OnAudioPlaybackPercent delegate function to get the playing USoundWave and the playback percent.
Keep in mind since sound cues can play many sound waves, this will be called back for each playing sound and return their playback percent.
There isn't a way to get the logical playback time of a sound cue (i.e. accumulating delay notes, etc) right now.
That worked really well - thank you! I can do beat-matching now.
The "OnAudioPlaybackPercent" event that I create doesn't seem to execute. I'm binding it to the Audio Component that I create with "CreateSound2D" but I can't see it activating. My sound cue is non-looping.