Skip to content

Commit cf46145

Browse files
Calling super method in setRate method of WebAudioSound class, setting returned value to source playback rate audio param and returning the same value to match method signature
1 parent f389176 commit cf46145

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

v3/src/sound/webaudio/WebAudioSound.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,11 @@ var WebAudioSound = new Class({
156156
* @private
157157
*/
158158
setRate: function () {
159+
var totalRate = BaseSound.prototype.setRate.call(this);
159160
if (this.source) {
160-
var cent = 1.0005777895065548; // Math.pow(2, 1/1200);
161-
var totalDetune = Math.max(-1200, Math.min(this.currentConfig.detune + this.manager.detune, 1200));
162-
var detuneRate = Math.pow(cent, totalDetune);
163-
var totalRate = this.currentConfig.rate * this.manager.rate * detuneRate;
164161
this.source.playbackRate.setValueAtTime(totalRate, 0);
165162
}
163+
return totalRate;
166164
}
167165
});
168166
/**

0 commit comments

Comments
 (0)