Play Music Looping Fix

Hello! I would like to request that the “Play Music” event gets updated/reworked so that audio played with it loops seamlessly.

If you don’t know what I’m referring to, there is a little but very noticeable gap between loops of music played with Play Music. According to what I’ve read on the forums, this doesn’t appear to be a bug, but rather just a consequence of how the system buffers.

As somebody who is making a game with ambient/soundscape tracks, this small intermission is very noticeable and completely throws off the immersion.

For a long time, I had been avoiding the Play Music event because of this and instead opted to use Play Sounds for the background music as it looped the tracks properly. This solution worked perfectly fine until my team and I have recently hit a sour spot where performance concerns along with a preloading bug creating unstoppable phantom tracks caused me to search for other solutions.

For some more context, all of our music uses .mp3. I haven’t tested to see if .aac works any differently.

3 Likes

It’s not just mp3, I mainly use .ogg and the audio doesn’t loop seamlessly for me. Even when I set the loop point to a certain point in a track just before the end, the phantom audio occurs for me.

Straight answer is YES there is issue but at the same time
Its kinda mix of 3 things where 2 can negate effect
1 - how it works
2 - music format itself
3 - codec you used

Can you tell me where it loops?
Like how long is that song?

And that is .aac file

Problem is most online converters and audio software have bad codecs when it comes to cutting off end/beginning of file
For audio i use Pazera Free Audio Extractor
Since seems its have best aac codec
Kinda same for ogg

BUT even so it sounds seamless
If i would try to make BEE sound or like car engine sound or even rain/water sound
By looping it
You would clearly hear when it ends
So this music from game above just had perfect silence moment which i used to loop it
(basically audio file does not end on some note but on silence so it sounds natural)

For now (and i know its not a fix but workaround) for perfect loops only .wav file works
But they produce huge file size
So better to cleverly loop music using pazera and then for stuff like rain/water/buzz/static/engine sounds use wav files