1
0
Fork 0

[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
No known key found for this signature in database
GPG Key ID: F6BA2A0302E21A77
1 changed files with 3 additions and 0 deletions

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();