From 9d8819ddc712e299a1dfc9a93c952dabf8fa953e Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Mon, 30 Jan 2017 10:56:31 -0500 Subject: [PATCH] audio engine handles rest block --- src/blocks/scratch3_sound.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/blocks/scratch3_sound.js b/src/blocks/scratch3_sound.js index bb9c4daac..17ed63af1 100644 --- a/src/blocks/scratch3_sound.js +++ b/src/blocks/scratch3_sound.js @@ -84,9 +84,9 @@ Scratch3SoundBlocks.prototype.playDrumForBeats = function (args, util) { return util.target.audioPlayer.playDrumForBeats(drum, beats); }; -Scratch3SoundBlocks.prototype.restForBeats = function (args, util) { +Scratch3SoundBlocks.prototype.restForBeats = function (args) { var beats = Cast.toNumber(args.BEATS); - return util.target.audioPlayer.waitForBeats(beats); + return this.runtime.audioEngine.waitForBeats(beats); }; Scratch3SoundBlocks.prototype.setInstrument = function (args, util) {