From f536a1a9f4b0f7f423560eb48cdc96975ef87919 Mon Sep 17 00:00:00 2001 From: Krunal Shah Date: Fri, 10 Jul 2020 19:06:47 -0400 Subject: [PATCH 1/2] Solve recurrent calls to captureSamples bug --- src/library_openal.js | 5 +++++ 1 file changed, 5 insertions(+) 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; }, From 13477c681ddf509efb80f2829ed617a37c06ea74 Mon Sep 17 00:00:00 2001 From: Krunal Shah Date: Fri, 10 Jul 2020 19:16:04 -0400 Subject: [PATCH 2/2] Added self to AUTHORS --- AUTHORS | 1 + 1 file changed, 1 insertion(+) 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