[Web] Fix issue when pausing an non-started sample
This commit is contained in:
parent
93d2706930
commit
030e7d4e2d
1 changed files with 3 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue