Add a way to sync audio tracks together

As a Roblox developer, it is currently impossible to sync several audio tracks perfectly together on Roblox if their TimePositions are not 0.

Initially when the audios are played from TimePosition = 0, they are perfectly synced with eachother. However, whenever a script tries to make an edit to the playback of the audios (eg: changing TimePosition, pausing and resuming playback) they almost always desync. This means that pausing the game in any capacity desyncs the audio tracks. I tried several ways of syncing them together, like repeatedly setting the TimePositions of the audios to the TimePosition of one specific audio in order to make them match up. Much to my dismay, these attempts to fix it either do nothing or make the problem much worse.

When I print the TimePosition of the audios, the game returns equal numbers. The game thinks that they are synced but from what I am hearing, they are clearly not! This is extremely frustrating, as I am developing a rhythm game that has the instrumentals and vocals as seperate tracks so that the vocals cut out if the player is missing their notes. The player cannot pause and resume the game without desyncing the audio tracks.

If this issue is addressed, it would improve my development experience because it would allow me to continue development of my rhythm game, and it would allow me to implement interesting audio design into other games, such as dynamic music that toggles different tracks to fit the mood of the current situation.


Wait, does calling Play() on 2 audios actually not play them at the same time? Do they desync that easily?

Even calling stop() on them at the same time just desyncs them?

1 Like

Well, I first preload all the audios using ContentProvider service, then when I run :Play() on both sounds it should sync, but it ONLY syncs properly when the TimePosition of the sounds are 0. otherwise it desyncs. If I :Stop() the sound and set the TimePosition to 0 and :Play(), it should still be synced.

So, yes if the Timeposition wasn’t 0 when you called :Play() or :Resume(), the sounds will never sync up.

So what happens if you play 2 audio tracks that both have their time position set to… let’s say 40.
And you Play() or Resume() them, then they desync? One plays a bit later than the other?

That sounds more like a bug tbh.

1 Like

Yes, they would desync in that situation.

1 Like