Skip to content

Commit 66f06fe

Browse files
authored
Merge pull request #414 from YoYoGames/html5-411-pause-resume-decoding-sound-develop
Add check for decoding sounds when resuming voices
2 parents 9ef5688 + b22c572 commit 66f06fe

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/functions/Function_Sound.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,12 @@ audioSound.prototype.resume = function() {
558558
}
559559
else {
560560
this.startoffset = this.playbackCheckpoint.bufferTime;
561+
562+
// If we are still decoding then there's nothing to do with the buffer source
563+
if (this.pbuffersource === null) {
564+
return;
565+
}
566+
561567
this.start(this.pbuffersource.buffer);
562568
}
563569
};

0 commit comments

Comments
 (0)