Magnet Region is slow to trigger

Thanks for the detailed investigation of this issue, and apologies for the long delay between replies.

When playing content on the timeline, the playback system has to introduce a delay so that things stay in sync. This delay is made up of schedule delay and lookahead. Schedule delay (usually one mixer block) allows enough time to schedule multiple sounds before the mixer thread catches up and starts playing one of them. Lookahead (usually two mixer blocks) provides a buffer period to avoid glitches if the time between updates is longer than expected.

Because magnet regions operate on the timeline, they are subject to the above delay. However, some operations on events are not subject to lookahead, so here are some possible workarounds that you could try to reduce the latency:

  • Automate the volume of the tracks that you want to stop, so that they go silent when the Scene parameter is set to Silence.
  • Add parameter conditions to all the sounds that you want to stop, so that they stop when the Scene parameter is set to Silence.
  • Change your game code to call EventInstance::setTimelinePosition() with the position of the Silence region whenever it sets the Scene parameter to Silence.
1 Like