servo / media

Mozilla Public License 2.0
82 stars 53 forks source link

Implement HRTF support #328

Open jdm opened 4 years ago

jdm commented 4 years ago

https://webaudio.github.io/web-audio-api/#Spatialization-hrtf-panning https://github.com/servo/media/blob/425011696dfae6b7c416b769aa850f42632c0366/audio/panner_node.rs#L308

It may be possible to reuse code from some existing rust implementations of HRTF:

https://github.com/mrDIMAS/rg3d-sound/blob/master/src/hrtf.rs

We may end up using one of the binaries from https://github.com/mrDIMAS/hrir_sphere_builder/tree/master/hrtf_base/IRCAM as the database for the underlying impulse/elevation data.

jdm commented 4 years ago

Another possibly: https://github.com/mbillingr/ambisonic/blob/42f130d7f18a3e071e67b061f5d1ba2fc304f236/src/renderer.rs#L174-L275

jdm commented 4 years ago

There is reference code in Firefox; see all of the files named HRTF* in https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink.

coryagoodwin commented 4 years ago

Me and my team will be taking on this issue with assistance from @jdm

coryagoodwin commented 4 years ago

We will no longer be taking this issue due to time constraints for our project. If anyone else would like to work on implementing this, you are free to.

jdm commented 3 years ago

https://github.com/mrDIMAS/hrtf https://crates.io/crates/hrtf