tweaked instrument setting

pull/89/head
jmoenig 2019-04-04 07:58:31 +02:00
rodzic 0da085bc59
commit 19a8aa0432
1 zmienionych plików z 8 dodań i 6 usunięć

Wyświetl plik

@ -9185,12 +9185,14 @@ Note.prototype.play = function (type, gainNode, pannerNode) {
Note.prototype.setInstrument = function (type) {
// private - make sure the oscillator node has been initialized before
this.oscillator.type = [
'sine',
'square',
'sawtooth',
'triangle'
][(type || 1) - 1];
if (this.oscillator) {
this.oscillator.type = [
'sine',
'square',
'sawtooth',
'triangle'
][(type || 1) - 1];
}
};
Note.prototype.stop = function () {