resonance-audio / resonance-audio-web-sdk

Resonance Audio SDK for Web
https://resonance-audio.github.io/resonance-audio/
Apache License 2.0
200 stars 56 forks source link

L R reverse #29

Open gtk2k opened 5 years ago

gtk2k commented 5 years ago

When I create and run "treasure-hunt.n.html" that modified the Tresure-Hunt sample to load the js file of src (direct_src) directly, L and R will sound reversely Yes. why? repository:forked

Ghorthalon commented 5 years ago

Yes, I can confirm that when setting the AmbisonicOrder to a higher value than 1, left and right seem to swap. I suppose this is not intended behavior?

capnmidnight commented 4 years ago

From what I can tell, this appears to have happened because the Omnitone code base was ported from a version originally written for a C++-based game engine, wherein the coordinate system is left-handed. Resonance/Omnitone compute audio in the right-handed coordinate system, so for that game engine the rotations had to be flipped to match the World. But WebAudio is right-handed, so that conversion isn't necessary.

Since this repo hasn't been updated in several years, I forked the two projects and fixed the issue here: https://github.com/capnmidnight/resonance-audio-web-sdk

Code6226 commented 3 years ago

@capnmidnight Looks like that link is 404ing now. What change did you make to fix it?