mirror of https://github.com/godotengine/godot
[Web] Fix issue when pausing an non-started sample
This commit is contained in:
parent
93d2706930
commit
030e7d4e2d
|
|
@ -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…
Reference in New Issue