diff --git a/v3/src/sound/webaudio/WebAudioSound.js b/v3/src/sound/webaudio/WebAudioSound.js index b1d40b87b..dd344503a 100644 --- a/v3/src/sound/webaudio/WebAudioSound.js +++ b/v3/src/sound/webaudio/WebAudioSound.js @@ -491,12 +491,12 @@ Object.defineProperty(WebAudioSound.prototype, 'seek', { if (this.isPlaying || this.isPaused) { value = Math.min(Math.max(0, value), this.duration); this.currentConfig.seek = value; + if (this.isPlaying) { + this.stopAndRemoveBufferSource(); + this.createAndStartBufferSource(); + } this.events.dispatch(new SoundValueEvent(this, 'SOUND_SEEK', value)); } - if (this.isPlaying) { - this.stopAndRemoveBufferSource(); - this.createAndStartBufferSource(); - } } }); /**