charlie_says Posted May 25, 2020 Share Posted May 25, 2020 (edited) 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 May 25, 2020 by charlie_says Quote Link to comment Share on other sites More sharing options...
bubamara Posted May 25, 2020 Share Posted May 25, 2020 using m4a instead is the workaround rulan 1 Quote Link to comment Share on other sites More sharing options...
charlie_says Posted May 26, 2020 Author Share Posted May 26, 2020 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 Quote Link to comment Share on other sites More sharing options...
Exca Posted May 26, 2020 Share Posted May 26, 2020 (edited) 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 May 26, 2020 by Exca charlie_says and b10b 2 Quote Link to comment Share on other sites More sharing options...
charlie_says Posted May 27, 2020 Author Share Posted May 27, 2020 Thanks @Exca that's really useful stuff. Quote Link to comment Share on other sites More sharing options...
bubamara Posted June 9, 2020 Share Posted June 9, 2020 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. charlie_says 1 Quote Link to comment Share on other sites More sharing options...
charlie_says Posted June 13, 2020 Author Share Posted June 13, 2020 Just in case anyone comes here for information - using sound sprites actually works much better for loops, probably for the reasons relayed in the above posts. Olloverr 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.