-
Notifications
You must be signed in to change notification settings - Fork 55
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
wasm performance compared to bevy_audio #47
Comments
oof, I'm not sure about the behavior I mentioned above anymore. not sure what I bumped (maybe my head 😅) but my |
Thank you for looking into this! |
Closing because I've spent some time digging and am convinced the crunchy/crackling audio isn't a kira or bevy_kira_audio issue. It's still there when I use rodio. I did get the behavior to change when I increased a default raw audio buffer size in cpal so that's probably where I'll keep looking. Thanks for your time ❤️ |
Could you tell me more about the changes in cpal that improved the situation? Maybe this is something that could be made configurable through Kira/rodio? |
@NiklasEi The changes I was experimenting with in cpal were mostly in the The crunchy audio while loading made me suspect some buffer underrun so I toggled the configuration buffer size, here https://github.com/RustAudio/cpal/blob/223f28262a80ac0b81688eb58507a4fb243e0694/src/host/webaudio/mod.rs#L202-L211 It does look like kira is building up a cpal config object https://github.com/tesselode/kira/blob/acb99e9e322da95cd91c4529d9a9f520e824ac56/crates/kira/src/manager/backend/cpal/wasm.rs#L51 so it might be feasible to expose it. Fwiw though, I'm not sure toggling that buffer size is ultimately the fix for my crunchy audio issue because I had to make the buffer a lot bigger and from the documentation it seemed like the main use case is actually making it smaller 😅 . |
if you're curious to see the behavior, it's deployed here https://limbo-pass-shnewto.vercel.app At the moment, it sits on the title screen for a good few seconds before drawing the scene, I've been experimenting with trying to get things to load before playing the audio but so far haven't resolved the behavior yet |
Hello! 👋
Thanks for all your work! I really love this crate ❤️ ❤️
I'm creating this issue because I'd like to document some surprising (to me) behavior of bevy_kira_audio / kira in comparison to bevy_audio 😄
Because of some crackling audio in the browser (see #27) I recently ported a project of mine to bevy_audio in a branch to experiment.
After porting I noticed a significant speedup to load times as well as the crackling audio going away.
Anecdotally, when using bevy_kira_audio it takes a couple seconds for my "Play" button to display and then a couple more after clicking "Play" for the scene to render. When I switched to bevy_audio, everything much quicker, i.e. no delay between startup and "Play" button or after clicking "Play".
project code: https://github.com/shnewto/limbo_pass
wasm branches
Some of this is definitely a candidate for being system specific, I'm on macOS Monterey 12.3.1. I'd be curious to know if this is or isn't the case for someone with a different setup.
The text was updated successfully, but these errors were encountered: