• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Seamlessly loop audio

ome6a1717

Member
I've made a looped audio wav file that loops seamlessly until I play it in GMS2. I will always get a pop for some reason - is there any extra data inserted in the file once I import it into GMS2?
 
Before we blame the engine, are you 100% sure your actual audio file starts AND ends at zero-crossing? If not, you WILL have a "pop" with 100% certainty.
You could also manually use mini-fades (a couple milliseconds is more than enough) at the start and end of it if you're not comfortable messing in DAWs.
 

ome6a1717

Member
Before we blame the engine, are you 100% sure your actual audio file starts AND ends at zero-crossing? If not, you WILL have a "pop" with 100% certainty.
You could also manually use mini-fades (a couple milliseconds is more than enough) at the start and end of it if you're not comfortable messing in DAWs.
Yes, I think you're right. Normally the way I do loops is a bit more advanced than that (which I've never had a problem with before), but this should work fine - thanks!
 

ome6a1717

Member
Would you care to post the audio file anyway so we can try it?
Ah, actually it'd be of no use. I just realized that after exporting it from my DAW, re-importing it gave the pop, as well. It had to do with the EQ I had on the track. I disabled that and it seemed to work just fine when re-importing.
 

ome6a1717

Member
Also, followup question - how do I get the sound to play as stereo? Everything is seemingly mono (even though the output target is set to stereo on the files themselves) - is this just because the game hasn't been exported?
 
Double click on the sound asset in the resource tree, you can choose the settings there. The game doesn't automatically extract the metadata, you have to set it manually.
 

TsukaYuriko

☄️
Forum Staff
Moderator
Does the audio file actually contain two non-identical channels? Any amount of times the same channel will sound mono either way.

If so, you may want to try clearing the asset cache (Ctrl+F7) after changing the audio resource settings.
 

ome6a1717

Member
Does the audio file actually contain two non-identical channels? Any amount of times the same channel will sound mono either way.

If so, you may want to try clearing the asset cache (Ctrl+F7) after changing the audio resource settings.
Perfect! Clearing the asset cache fixed it - thank you!
 
Top