Skip to content

Commit e2b2dce

Browse files
committed
Merge pull request #102955 from adamscott/fix-web-audio-pause
[Web] Fix issue when pausing an non-started sample
2 parents 24dccd4 + 030e7d4 commit e2b2dce

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

platform/web/js/libs/library_godot_audio.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,9 @@ class SampleNode {
735735
* @returns {void}
736736
*/
737737
_pause() {
738+
if (!this.isStarted) {
739+
return;
740+
}
738741
this.isPaused = true;
739742
this.pauseTime = (GodotAudio.ctx.currentTime - this._sourceStartTime) / this.getPlaybackRate();
740743
this._source.stop();

0 commit comments

Comments
 (0)