Audio: loop gap from the end to the beginning.

Started by nightmarer, Wed 06/01/2021 20:02:48

Previous topic - Next topic

nightmarer

Good evening all.

I realized that the ambiance loops leave a gap before they start again that lasts a little less than a second.
I know it is not too much, but it is fair enought to be noticed, especially if the game is playing a noisy ambience, as the sound of the rain.
I tested that the loop is correct if I execute it outside of AGS.
Does anybody experienced this issue? Is there any way to fix it?

Regards.

Laura Hunt

If you want to create seamless loops in AGS, you need to use ogg or wav. Converting to mp3 always leaves a silent "gap" (this is an issue in the format itself, not in AGS), so in very simple terms, mp3s can only be looped seamlessly if the application you're using "knows" this and can compensate for it by removing that gap in real time. Most mp3 players and audio editing apps do this, which is why you don't hear the gap when you play your loop outside of AGS.


nightmarer

Hello, thanks for your answer.

it is ok to convert the sounds to ogg, or I need to export the audio again?

Regards.

Laura Hunt

If you convert your mp3 directly to ogg, then the gap will still be there, of course (not to mention that the two-step compression would result in further loss of quality). You would need to export the audio directly to ogg if your audio editing software/DAW allows for it, or export to wav and then convert from that to ogg.

nightmarer


nightmarer

BTW to who may concern. An OGA file is an OGG file. If anyone has an OGA file he can just change oga to ogg extension and it works perfect in AGS.

Regards.

Crimson Wizard

#6
Quote from: nightmarer on Thu 11/02/2021 16:43:14
BTW to who may concern. An OGA file is an OGG file. If anyone has an OGA file he can just change oga to ogg extension and it works perfect in AGS.

That depends, as I found out recently, AGS can only reliably play files encoded with OGG Vorbis codec, but fails at some others. For example it failed playing OGA file encoded with FLAC codec. I've tested one from this page: https://filesamples.com/formats/oga and it did not work.

SMF spam blocked by CleanTalk