Jump to content

PIXI Sound mp3 loop 'pause'


charlie_says
 Share

Recommended Posts

I was just working on a test, using PIXI sound with an MP3 loop.

The issue is there's a  small pause before the loop re-plays, meaning it doesn't really loop properly.

The loop is currently repeated by calling a replay function in the onComplete parameter in the options, but I get the same result if I replace that with loop:true (I expect that under the hood it works the same way, but I didn't check yet.)

This isn't exclusively a PIXI sound issue, I remember having the same problems with MP3s in Flash - so what I'm really interested in is ideas to work around the issue?

Edited by charlie_says
Link to comment
Share on other sites

The mp3 looping problem is caused by the format. It can be mitigated by fiddling around the original sound source and compression: https://www.compuphase.com/mp3/mp3loops.htm

I'd suggest using multiple formats and drop them based on browser support. Most of the audio libraries have alternateExtension -configuration (or something similar) to handle this. I usually go with ogg as first choice and then mp3 for those that dont support ogg.

Edited by Exca
Link to comment
Share on other sites

  • 2 weeks later...
On 5/26/2020 at 8:53 AM, charlie_says said:

hmmm thanks, on testing m4a (I was using mp3 deliberately as I know it performs worse) that does work better, but it's not seemless and peformance between browsers is a bit variable too. I think what this means is I'll need to work on  a different way of organising my sounds :S

AAC LC should give you seamless playback, but not AAC HE. Can't say much about performance, but I prefer using m4a + ogg (Vorbis) as fallback.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...