Audio desyncing on focus lost / output device disconnected

As the title says, audio gets desynced when the app loses focus (on mobile iOS) or when a audio device is disconnected (like a headphone), this causes the audio to desync with the timeposition property since roblox has to stop the audio (for example on focus lost on mobile) and then resume it but the property doesnt have the correct value.

Here’s the bug happening on an apple device after the widget tray was opened, the game (Project: Afternight [INDEV] - Roblox) uses sound.TimePosition on BindToRenderStep (Priority: Input + 10) to sync the notes with the audio so the chart is played in sync, however TimePosition gets desynced whenever roblox has to pause the audio internally (app focus lost or output device change)

(Another video comparing the desync)

Here’s a place file where the bug can be replicated, it wont happens through studio audio mute feature, but still happens if you unplug and plug an output device.
soundDesync.rbxl (60.8 KB)


This is just an acknowledgment announcement!

We’ve filed a ticket to our internal database, and we’ll follow up when we have an update!

Thanks for the report!

1 Like