Skip to main content
2mo ago

Audio playback from any playhead position

Hello, I have an audio track that I'd like to be mapped fully to the timeline so that I can play the audio wherever the playhead position is in the timeline. Right now, I have a 45s animation, and I have to move the playhead to the very beginning of the timeline each time to see how a keyframe syncs with the audio. How can I achieve this? I'm on Windows using BETA 0.8.1780

1 reply
2mo ago

I'm not sure I'd use Rive audio events in this exact scenario. The current version of our audio events work great for quick sound effects, but they're not ideal for trying to sync long audio with a timeline.

The code will be different depending on the runtime you're using, but here's basically what I would do instead:

  1. Manage the audio playback in your code, including triggering events when it reaches a certain point in the audio

  2. When the audio events are triggered, call a trigger in Rive to control your state machine: https://rive.app/community/doc/state-machines/docxeznG7iiK#nested-inputs