Skip to content

Solve recurrent calls to captureSamples bug #11617

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -487,3 +487,4 @@ a license to everyone to use it as detailed in LICENSE.)
* Sebastián Gurin (cancerberoSgx) <sebastigurin@gmail.com>
* Benedikt Meurer <bmeurer@google.com> (copyright owned by Google, LLC)
* Jiulong Wang <jiulongw@gmail.com>
* Krunal Shah <ktgshah@gmail.com>
5 changes: 5 additions & 0 deletions src/library_openal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},


Expand Down