Hi
I have an audio file (OGG) that is gapless. When you preview it in unity with loop on, you can hear it being gapless.
But when I build the audio file into an AssetBundle, load it into my app and play it as a loop, there is a 1 or 2 second pause in it.
The best settings I got to create the smallest gap is:
- Decompress On Load
- PCM (Vorbis gives me the biggest gap.)
- Preserve Sample Rate
There is a sentence on the bottom of following page that I don’t like though: Unity - Manual: Audio Clip
It says: On mobile platforms compressed audio is encoded as MP3 to automatically take advantage of hardware decompression.
Mp3 files are hard to make gapless. so if unity builds all the android audio into mp3, then maybe it adds gaps to them. There was a toggle ‘gapless looping’ in an older version of Unity, but in Unity 5 I don’t see that setting anymore.
Does someone know how to fix this? Is this a bug?
Does someone know a setting that works and makes my audio gapless?
Thanks in advance.