Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox ogg vorbis sound effects - some work, some don't (help, help me Rhonda!) #74

Closed
martonic opened this issue Aug 8, 2014 · 5 comments

Comments

@martonic
Copy link

martonic commented Aug 8, 2014

Hi! I purchased six sound effects in wav format and converted them to mp3 and ogg vorbis using either total audio converter or audacity. The buzz format string is "ogg", "mp3" for all of the sounds. All of the sounds play in chrome and i.e. without any problems. But in Firefox, two of the sounds work with both conversions; one works only when converted by total sound converter; one works only when converted by audacity; and two of them don't work either way. Mediainfo reports the same info (Vorbis, 44.1 khz, 256 bps) for all twelve of the ogg conversions. VLC plays all of the ogg files just fine. Needless to say, this is making me crazy. Can anyone suggest a solution?

@martonic
Copy link
Author

martonic commented Aug 8, 2014

I added "wav" formats and changed the format string to this: {formats: [ "wav", "ogg", "mp3" ]}.
Now, if I clear the cache, then all the sounds work repeatedly, except for one of them which works one time but is silent from then on. However, if I reload the page, then it's back to only two of the sounds working reliably. This is all repeatable, though maddeningly flaky. (Firefox 31 on Windows 7 Pro 64 bit). I can't figure out how to debug this. Suggestions will be more than appreciated.

@martonic martonic closed this as completed Aug 8, 2014
@martonic martonic reopened this Aug 8, 2014
@martonic
Copy link
Author

martonic commented Aug 9, 2014

I tried dropping the ogg format entirely, using just wav and mp3. The results are identical!

@martonic
Copy link
Author

martonic commented Aug 9, 2014

Here is the code. Why this causes totally bizarre behavior in Firefox, I only wish I could imagine.

var clickSound = new buzz.sound( "/media/organic_nav_32", {formats: [ "wav", "mp3" ]} );
var moveSound = new buzz.sound( "/media/click_organic_nav_19", {formats: [ "wav", "mp3" ]} );
var captureSound = new buzz.sound( "/media/click_organic_nav_12", {formats: [ "wav", "mp3" ]} );
var castleSound = new buzz.sound( "/media/click_organic_nav_22", {formats: [ "wav", "mp3" ]} );
var checkSound = new buzz.sound( "/media/notifier_39", {formats: [ "wav", "mp3" ]} );
var startSound = new buzz.sound( "/media/alert_08_ascending", {formats: [ "wav", "mp3" ]} );

function playSound(sval) {
switch (sval){
case "click": clickSound.play(); break;
case "move": moveSound.play(); break;
case "capture": captureSound.play(); break;
case "castle": castleSound.play(); break;
case "check": checkSound.play(); break;
case "start": startSound.play(); break;
default: break;
}
}

It could hardly be any simpler. Works perfectly in Chrome and I.E. Very strange in Firefox. Help!

@martonic
Copy link
Author

martonic commented Aug 9, 2014

Update: I switched to the "howler.js" library and now all the sounds play consistently, even in Firefox and even after reloading the page, except for the shortest sound which still only plays in chrome and i.e. (with buzz, under Firefox it played one time only after clearing the cache). So there may be an issue with very short ogg/wav sounds under firefox, and also, apparently, some bugs in buzz.js when it comes to firefox 31.

@jaysalvat
Copy link
Owner

Thanks Martonic for all those feedbacks and reports.

It will be hard for me to fix it you know. If it works on all browsers excepts Firefox, there are great chances the issue is in Firefox :)
Maybe we will find a hack.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants