That's because of a bug in Firefox, that I'm in the process of fixing, at the moment. Sorry about that.
This is the bug in question: https://bugzilla.mozilla.org/show_bug.cgi?id=848954
Question
I'm having a weird problem with the Web Audio API.
I'm playing a constant smooth sinewave, and it sounds perfect. But when I run it through an analyzer and make a visualization for it, it keeps glitching and twitching around even though I hear no change in the sound and nothing is happening besides the visualizer draw loop.
Sound:
oscillator1 -> gain1 -> |
oscillator2 -> gain2 -> | gain (master) -> analyser -> destination
in visualizer loop:
var bData = new Uint8Array(analyser.frequencyBinCount);
analyser.getByteFrequencyData(bData);
//for loop in which I use "bData[i]" to get the bar heights//
Result:
Why does this happen and is there a way to fix it?
I'm using Firefox 27.0.1 by the way.
No correct solution
OTHER TIPS
That's because of a bug in Firefox, that I'm in the process of fixing, at the moment. Sorry about that.
This is the bug in question: https://bugzilla.mozilla.org/show_bug.cgi?id=848954