web-audio-api-rs: Setting HRTF on panner node will freeze for 800 milliseconds
Trying out 0.34, there’s another oddity with the Panner Nodes (you’ll be getting a lot of in a game testing from me!) Again, thank you for this lib, and I’ll try my best to shake out bugs for you.
If you do this:
panner.set_panning_model(PanningModelType::HRTF);
You get a pause (on my AMD/windows home, haven’t tested it on my mac yet) or about 800 milliseconds. My physics thread was complaining a lot about this 😃
If you use ::EqualPower, it works fine. BTW, no crashing on panner nodes anymore, so that issue has been fixed.
About this issue
- Original URL
- State: closed
- Created 9 months ago
- Comments: 21 (9 by maintainers)
Commits related to this issue
- Improve HRTF panner initialization time by caching the HRIR sphere relates to #371 — committed to orottier/web-audio-api-rs by orottier 8 months ago
Alright thanks for the feedback. I will update #375 with
I’d second that. My audio context creation is spun up at the same time I’m spinning up my web gpu context, that’s all expected time loss at the beginning of any application. 300 ms once really isn’t that bad; it’s just bad when you have to do it 10,000 times and only have a couple ms to spare every time.
And, again: Thanks for all the work! I picked rust to learn specifically because of the wgpu and this library; I want to be as cross platform as possible and I want my interfaces to things like lower level sound and graphics to be as long lived as possible and being a web standard gives me that option.
Importing a lib locally is quite simple actually, you just have to change your
Cargo.tomlto give a relative path to the lib, e.g.: