use a single global tempo owned by audioengine

This commit is contained in:
Eric Rosenbaum 2017-01-09 15:47:29 -05:00
parent bd8fdad1d4
commit 2d7cfd128a

View file

@ -114,18 +114,18 @@ Scratch3SoundBlocks.prototype.getVolume = function (args, util) {
return util.target.audioPlayer.currentVolume; return util.target.audioPlayer.currentVolume;
}; };
Scratch3SoundBlocks.prototype.setTempo = function (args, util) { Scratch3SoundBlocks.prototype.setTempo = function (args) {
var value = Cast.toNumber(args.TEMPO); 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); var value = Cast.toNumber(args.TEMPO);
util.target.audioPlayer.changeTempo(value); this.runtime.audioEngine.changeTempo(value);
}; };
Scratch3SoundBlocks.prototype.getTempo = function (args, util) { Scratch3SoundBlocks.prototype.getTempo = function () {
return util.target.audioPlayer.currentTempo; return this.runtime.audioEngine.currentTempo;
}; };
Scratch3SoundBlocks.prototype.soundsMenu = function (args) { Scratch3SoundBlocks.prototype.soundsMenu = function (args) {