0
votes

I have a scene which is playing a looping sound:

<a-assets> <audio id="ambience" src="./audio/ambient.mp3" preload="auto"></audio>
<a-entity id="ambience_sfx" sound="src: #ambience; autoplay: true; loop: true; volume: 0.6;"></a-entity>

The sound plays and loops although there is a small gap when the loop happens - I have checked my sound file has no gaps at the start or end and have removed metadata when I exported the .mp3.

How can I get a clean looping sound?

1
stackoverflow.com/questions/7330023/gapless-looping-audio-html5 '[ with a HTML5 element ] There is no guarantee that audio will play when you want it to or without delay. ' There are a few options in the first answer that could be used to have a gapless audio loop.Ethan Hermsey

1 Answers

0
votes

I got a smooth loop when I switched to .ogg format rather than .mp3.

Only problem now is that .ogg is not supported on Safari iOS :/