Looped sound glitch

Hello everyone,

I’m having a problem with animations with looped sounds, particularly in Firefox.

All the Hype animations using sound on my website worked fine until a couple of months ago, then the previously smooth loops started to pause very slightly before starting again.

There’s no problem on Safari and a friend tested other browsers and said everything seems fine on Chrome, but he can hear the pause on Firefox, Tor, Internet Explorer, Edge, Opera and Vivaldi.

I’ve tried everything I can think of to fix it and nothing works. New animation files, new sound loops, new website pages. No luck.

I checked again today and the problem occurs both when I’m previewing an animation directly from the Hype file and when I upload the oam file to my website, so I’m now assuming it’s not a website problem.

The loop is only 0.4 seconds long and I do have “preload” checked for both the mp3 and ogg files in the Hype animation folder. I’ve tested animations with longer sound files and the same problem is happening.

I made a test file and put it here. The loop starts when you click the yellow glove

http://www.menopausosaurus.uk/looptest/

(Website made using Wordpress)

Any ideas?

That’s very weird – I’m hearing the delay as well. I went back a few versions in Firefox but it always had a slight delay. Do you remember when it worked without a delay?

The buffering, looping, and different browser quirks makes this a tricky thing to diagnose. Even an audio library that is supposed to handle issues like this (Howler) has a set of workarounds for looping audio: https://github.com/goldfire/howler.js/issues/165#issuecomment-366852586.

But I did get a good loop setup in Firefox using Howler which you can download here: audio.hype 2.zip (132.9 KB) which should work for you.

This is a regression in Firefox 71. It has not yet been fixed in the Firefox 77 nightly. I’ve filed a bug here:

It also appears if you just use the .ogg only for an audio source it will loop fine, so you could potentially play different audio depending on the user’s browser (but this would require some browser detection and javascript on your part).

Thank you both, that helps at lot. In answer to your question Daniel, I first noticed the delay on 21st Feb 2020. The website’s been up for about a year and there had been no loop problems before that.

1 Like