pass volume to audioengine playnote

This commit is contained in:
Eric Rosenbaum 2017-02-09 14:52:15 -05:00
parent 45f39c2ebd
commit cd750b5dda

View file

@ -135,8 +135,9 @@ Scratch3SoundBlocks.prototype.playNoteForBeats = function (args, util) {
var beats = Cast.toNumber(args.BEATS); var beats = Cast.toNumber(args.BEATS);
var soundState = this._getSoundState(util.target); var soundState = this._getSoundState(util.target);
var inst = soundState.currentInstrument; var inst = soundState.currentInstrument;
var vol = soundState.volume;
if (typeof this.runtime.audioEngine === 'undefined') return; 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) { Scratch3SoundBlocks.prototype.playDrumForBeats = function (args, util) {