jbergknoff / guitar-tuner

Browser-based guitar tuner
MIT License
175 stars 34 forks source link

Firefox garbage collection bug causes microphone input to stop prematurely #1

Closed ghost closed 9 years ago

ghost commented 9 years ago

There's a firefox bug that affects guitar-tuner: https://bugzilla.mozilla.org/show_bug.cgi?id=934512

Here's one hack that fixes it, in index.html:

var microphone = audio_context.createMediaStreamSource(stream);
window.source = microphone;  // Workaround for: https://bugzilla.mozilla.org/show_bug.cgi?id=934512
var script_processor = audio_context.createScriptProcessor(1024, 1, 1);
jbergknoff commented 9 years ago

Thanks for the report and the fix. I've incorporated it just now.