mirror of
https://github.com/scratchfoundation/scratch-audio.git
synced 2025-03-17 18:30:04 -04:00
converesion from one-indexing to zero-indexing happens in vm
This commit is contained in:
parent
ad81e1d3de
commit
3c520d6e10
1 changed files with 2 additions and 3 deletions
|
@ -36,9 +36,8 @@ function DrumPlayer (outputNode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
DrumPlayer.prototype.play = function (drum, outputNode) {
|
DrumPlayer.prototype.play = function (drum, outputNode) {
|
||||||
var drumNum = drum - 1;
|
this.drumSounds[drum].outputNode = outputNode;
|
||||||
this.drumSounds[drumNum].outputNode = outputNode;
|
this.drumSounds[drum].start();
|
||||||
this.drumSounds[drumNum].start();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
DrumPlayer.prototype.stopAll = function () {
|
DrumPlayer.prototype.stopAll = function () {
|
||||||
|
|
Loading…
Reference in a new issue