1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-05 19:31:35 +00:00

[Web] Fix issue when pausing an non-started sample

This commit is contained in:
Adam Scott
2025-02-17 09:46:13 -05:00
parent 93d2706930
commit 030e7d4e2d

View File

@@ -735,6 +735,9 @@ class SampleNode {
* @returns {void}
*/
_pause() {
if (!this.isStarted) {
return;
}
this.isPaused = true;
this.pauseTime = (GodotAudio.ctx.currentTime - this._sourceStartTime) / this.getPlaybackRate();
this._source.stop();