Is it possible to compile SteamAudio binaries targeting WebAssembly?
Hello!
I'm a contractor helping an accessibility-focused research lab modernize some of their Unity projects for blind gamers, which make heavy use of spatial audio. One of the possibilities I'm currently looking into is supporting spatial audio in WebGL builds of projects; as far as I can tell this used to be possible using Google's resonance audio, but that framework apparently stopped receiving updates about two years ago.
SteamAudio seems to be the only spatial audio solution supporting custom HRTFs with ongoing developer support available for Unity at the moment (Jan 2023), and works with almost all major platforms except for WebGL.
Looking through the build documentation, it seems like I could get as far as compiling the available SteamAudio source code to wasm, but that I would need a wasm version of phonon.dll to link against to get a working binary for WebGL. (As far as I can tell, phonon is closed-source / not publicly available other than in binary form.)
I did see there is some precedent for individual 3rd-party developers working with Valve to bring SteamAudio compatibility to new platforms. It's my loose understanding that a wasm version of SteamAudio would need to make use of the Web Audio API's AudioWorklets feature, and that this by itself, from within the Unity runtime, is somewhat difficult.
If I were able to get access to the relevant source code for phonon.dll, I'd be willing to take a crack at making it wasm-compatible, although I'm also aware this could be quite difficult.
Thanks for your time! -Alex
If I were able to get access to the relevant source code
Take a second look at the repo now :smile:
If I were able to get access to the relevant source code
Take a second look at the repo now 😄
ahh right it's fully open source now! amazing