Skip to content
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

Fix rwebaudio bug #15442

Merged
merged 2 commits into from
Jul 1, 2023
Merged

Fix rwebaudio bug #15442

merged 2 commits into from
Jul 1, 2023

Conversation

ethanaobrien
Copy link
Contributor

@ethanaobrien ethanaobrien commented Jun 30, 2023

Guidelines

  1. Rebase before opening a pull request
  2. If you are sending several unrelated fixes or features, use a branch and a separate pull request for each
  3. If possible try squashing everything in a single commit. This is particularly beneficial in the case of feature merges since it allows easy bisecting when a problem arises

Description

Fixes a known bug in the rwebaudio (emscripten) driver.

Upon page load, the audio driver, especially on lower end devices, would freeze the page. The console and page would be entirely unresponsive. This fix adds a padding that fixes that issue while preserving audio quality. I dont fully understand why it fixes it, all I can say is that it does

note, you can technically just decrease the blocking check by 1 (RA.bufIndex === RA.numBuffers-1) and not increase the overall amount of buffers, but this causes major audio glitches. I dont understand why decreasing it by 2 and increasing the overall amount of buffers fixes this freezing bug, but it does.

Related Issues

See EmulatorJS/EmulatorJS#416

@ethanaobrien ethanaobrien marked this pull request as draft June 30, 2023 17:01
@ethanaobrien ethanaobrien marked this pull request as ready for review June 30, 2023 17:11
@LibretroAdmin LibretroAdmin merged commit 7ac3dcd into libretro:master Jul 1, 2023
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants