Files
UnrealEngineUWP/Engine/Source/Runtime/HTML5
Aaron McLeran ead0bd8bf9 UE-9692, UE-9446 Fixing 3d audio spatialization for HTML5 and Linux.
- 3d audio was fundamnetally broken in HTML5 and Linux for a long time (probably since original port from UE3)
- Fix is to do 3d spatialization math the same way we do it on XAudio2 (i.e. transform to listener-space then do relative source position from there)
- Since HTML5 and Linux *both* use nearly identical OpenAL implementations (and Linux has been fixed by users for a few issues), I decided to nuke the HTML5 implementation and instead link to the Linux implementation. Not sure if we should move the linux OpenAL implementation to a different folder, but it turned out not to matter for packing and testing HTML5
- Also went ahead and added a -3dB headroom factor to reduce volume overall with OpenAL implementation since it was louder than the XAudio2 implementation. I didn't do any technical measurements to come up with this headroom factor, just ear-balled it. We can do something more precise if needed.
- Tested this fix using a simple test-map of a single looping sound source. It was obviously broken (i.e. not panning) and is now obviously fixed.

[CL 2611557 by Aaron McLeran in Main branch]
2015-07-06 16:15:23 -04:00
..