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

Handle audio filtering and output in Javascript #7

Open
pdjstone opened this issue Nov 18, 2023 · 0 comments
Open

Handle audio filtering and output in Javascript #7

pdjstone opened this issue Nov 18, 2023 · 0 comments

Comments

@pdjstone
Copy link
Owner

Profiling shows that a significant time of each frame is current spent in iir_l and iir_r in sound.c which perform the low-pass audio filtering. I'm not sure why these are so slow, but I suspect it would be more performant to do the filtering using WebAudio, which has an IIR filter built in . Currently audio is done using SDL audio which is translated by Emscripten into WebAudio calls.

Bypassing SDL/Emscripten altogether would hopefully be a performance win, especially if we can use an AudioWorklet to do the work in a separate thread from the main emulation.

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

No branches or pull requests

1 participant