Merge pull request #102955 from adamscott/fix-web-audio-pause
[Web] Fix issue when pausing an non-started sample
This commit is contained in:
@ -735,6 +735,9 @@ class SampleNode {
|
|||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
_pause() {
|
_pause() {
|
||||||
|
if (!this.isStarted) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.isPaused = true;
|
this.isPaused = true;
|
||||||
this.pauseTime = (GodotAudio.ctx.currentTime - this._sourceStartTime) / this.getPlaybackRate();
|
this.pauseTime = (GodotAudio.ctx.currentTime - this._sourceStartTime) / this.getPlaybackRate();
|
||||||
this._source.stop();
|
this._source.stop();
|
||||||
|
|||||||
Reference in New Issue
Block a user