MIDI.js icon indicating copy to clipboard operation
MIDI.js copied to clipboard

Loading multiple instruments on Firefox tends to cause an unknown error while processing while processing decodeAudioData

Open DoomTay opened this issue 8 years ago • 1 comments

If I have a setup like this

MIDI.USE_XHR = false;
MIDI.loadPlugin({
	soundfontUrl:"http://gleitz.github.io/midi-js-soundfonts/MusyngKite/",
	instruments: [0,4],
	onsuccess: function() {
		var startingPoint = MIDI.getContext().currentTime;
		MIDI.noteOn(0, 50, 127, startingPoint);
		MIDI.noteOn(4, 55, 127, startingPoint + 1);
	}
});

I will occasionally get the error An unknown error occurred while processing decodeAudioData.

Sometimes, this can result in an "out of memory" exception or outright crash the browser

Meanwhile, I could load similar code on Chrome, loading 5 instruments, and not a single failure occurs.

DoomTay avatar Jun 13 '17 17:06 DoomTay

This was a Firefox bug that was fixed.

hmoffatt avatar Oct 12 '21 10:10 hmoffatt