From cd750b5dda4ee7a845fd90349cd6075e3d0f0bd0 Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Thu, 9 Feb 2017 14:52:15 -0500 Subject: [PATCH] pass volume to audioengine playnote --- src/blocks/scratch3_sound.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/blocks/scratch3_sound.js b/src/blocks/scratch3_sound.js index 20d137580..e9f9df4d7 100644 --- a/src/blocks/scratch3_sound.js +++ b/src/blocks/scratch3_sound.js @@ -135,8 +135,9 @@ Scratch3SoundBlocks.prototype.playNoteForBeats = function (args, util) { var beats = Cast.toNumber(args.BEATS); var soundState = this._getSoundState(util.target); var inst = soundState.currentInstrument; + var vol = soundState.volume; if (typeof this.runtime.audioEngine === 'undefined') return; - return this.runtime.audioEngine.playNoteForBeatsWithInst(note, beats, inst); + return this.runtime.audioEngine.playNoteForBeatsWithInstAndVol(note, beats, inst, vol); }; Scratch3SoundBlocks.prototype.playDrumForBeats = function (args, util) {