-
Notifications
You must be signed in to change notification settings - Fork 364
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
Choppy sound when running through WASM on high-end mobile devices #780
Comments
The web implementation of CPAL is pretty hacky and is rendering on the main thread. I wouldn't expect much from it. WebAudio is just terrible when it comes to WASM support. |
Is there something that makes rendering on a WebWorker a non viable option? I have no idea how the web implementation of CPAL works under the hood, but I can try and work on that assuming it's not a deal breaker for some reason. |
I haven't looked at it for a while, but I do remember it was very hard. If I remember correctly, for it to work as intended you need to load a |
Hey guys! I've been working on a GameBoy emulator which runs on the web: https://nicolas-siplis.com/ironboy/
I've been using Pixels + Winit + CPAL for handling video, audio and inputs and so far this has worked perfectly fine on all platforms I tested, including the web!
... Except on mobile devices. For some reason audio always seems choppy when running on mobile, and though I've tried I can't seem to pinpoint why it might be happening. It's hard to run things like flamegraph when you're debugging a mobile device, so I'm sort of at my wit's end.
If you want to take a look at the source code for the project (which isn't doing anything fancy with CPAL, AFAICT), check out https://github.com/nicolas-siplis/IronBoy/blob/master/src/apu.rs
The text was updated successfully, but these errors were encountered: