diff --git a/AUTHORS b/AUTHORS index 2154d7847938e..b2e4bf437b636 100644 --- a/AUTHORS +++ b/AUTHORS @@ -487,3 +487,4 @@ a license to everyone to use it as detailed in LICENSE.) * Sebastián Gurin (cancerberoSgx) * Benedikt Meurer (copyright owned by Google, LLC) * Jiulong Wang +* Krunal Shah diff --git a/src/library_openal.js b/src/library_openal.js index 040ca2210924a..8977b2d61b372 100644 --- a/src/library_openal.js +++ b/src/library_openal.js @@ -2056,6 +2056,11 @@ var LibraryOpenAL = { // of available captured sample-frames, but not only would it // be insane not to do, OpenAL-Soft happens to do that as well. c.capturedFrameCount = 0; + + // Reset capturePlayhead to 0 since the existing samples are + // all anyways lost, since FrameCount is reset. Hence it is + // equivalent to starting with a clean slate. + c.capturePlayhead = 0; },