GaryS Posted March 10, 2016 Share Posted March 10, 2016 So, I've seen this issue mentioned all over the place - usually due to some bug in FF that is subsequently fixed. I'm using OGG sound files exported from Audacity from WAV files (I've tried with MP3s too). They work fine in Chrome and IE (ugh!), but in FF I get the error: The buffer passed to decodeAudioData contains invalid content which cannot be decoded successfully. If this isn't a bug in FF, then I can only presume there's something wrong with the data in my sound files, but I don't know what they could be. Most of the sounds were made using SFXR. Can anyone point me at some software, or some settings in Audacity, that might be able to address whatever junk data has ended up in the files? Failing that, anyone aware of a bug in FF45? Thanks Link to comment Share on other sites More sharing options...
rgk Posted March 10, 2016 Share Posted March 10, 2016 Hmmm, I just upgraded to FF45 and sound in my game works, they are just mp3 files. Have you tried using other audio files as a test? Link to comment Share on other sites More sharing options...
GaryS Posted March 10, 2016 Author Share Posted March 10, 2016 Yeah, the audio works on the Phaser examples, so I'm sure the issue is something to do with the way I've exported the files from Audacity - but I've tried a few different settings to no avail. I've seen others mention 'junk data' in the audio files, so I'm wondering what that might refer to and how I might find it... or perhaps there's an accepted way to export audio for use in Phaser? Link to comment Share on other sites More sharing options...
rgk Posted March 11, 2016 Share Posted March 11, 2016 Just doing a quick search online said it most likely is a firefox bug: http://stackoverflow.com/questions/25351667/html5-game-works-in-ie-chrome-fails-in-firefox-until-i-navigate-to-a-mp3 Link to comment Share on other sites More sharing options...
staff0rd Posted May 1, 2016 Share Posted May 1, 2016 I just tested my game on Firefox 45.0 and 46.0, and it breaks on sound loading for both. I supply both ogg and m4a. Phaser picks the ogg to download, then firefox just fails with; The buffer passed to decodeAudioData contains invalid content which cannot be decoded successfully. EncodingError: The given encoding is not supported. Also, it looks like Phaser examples are using mp3s - which obviously have a licensing cost associated. Perhaps this issue is specific to ogg? EDIT: Strange, I edited this and removed the mp3, it loaded the ogg fine in firefox. Then I tried the online version of my game - firefox loads the oggs correctly. Looks like this issue is specific to loading ogg on localhost (through a webserver). Possibly a local caching issue - the requests to preload the oggs are returned with 304 Not Modified and then the errors above are thrown. Link to comment Share on other sites More sharing options...
Recommended Posts