From 2d7cfd128aef8286077651e75fdadf55789c6143 Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Mon, 9 Jan 2017 15:47:29 -0500 Subject: [PATCH] use a single global tempo owned by audioengine --- src/blocks/scratch3_sound.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/blocks/scratch3_sound.js b/src/blocks/scratch3_sound.js index f1a16f179..34ca40a3d 100644 --- a/src/blocks/scratch3_sound.js +++ b/src/blocks/scratch3_sound.js @@ -114,18 +114,18 @@ Scratch3SoundBlocks.prototype.getVolume = function (args, util) { return util.target.audioPlayer.currentVolume; }; -Scratch3SoundBlocks.prototype.setTempo = function (args, util) { +Scratch3SoundBlocks.prototype.setTempo = function (args) { var value = Cast.toNumber(args.TEMPO); - util.target.audioPlayer.setTempo(value); + this.runtime.audioEngine.setTempo(value); }; -Scratch3SoundBlocks.prototype.changeTempo = function (args, util) { +Scratch3SoundBlocks.prototype.changeTempo = function (args) { var value = Cast.toNumber(args.TEMPO); - util.target.audioPlayer.changeTempo(value); + this.runtime.audioEngine.changeTempo(value); }; -Scratch3SoundBlocks.prototype.getTempo = function (args, util) { - return util.target.audioPlayer.currentTempo; +Scratch3SoundBlocks.prototype.getTempo = function () { + return this.runtime.audioEngine.currentTempo; }; Scratch3SoundBlocks.prototype.soundsMenu = function (args) {