by Chris » Mon Apr 25, 2016 9:39 pm
Would it instead be possible to have an explicit HeadRelative flag for such sounds, rather than just guessing if it's "close enough"? There was a similar issue previously where even though the sound and listener positions were set the same, because the values were so large some of internal transforms applied to the sound position was creating floating point rounding errors on some systems/compilers, which were larger than the approximately-zero allowance of 1.19209290e-07 (this was fixed on OpenAL Soft's side by changing to doubles instead of floats for certain calculations, thereby reducing the rounding error, but having a clear indication of which sounds should be head-relative would be a better fix).
I can otherwise make a similar fix for the OpenAL backend as was applied to the FMOD backend, though it feels kludgy.
Would it instead be possible to have an explicit HeadRelative flag for such sounds, rather than just guessing if it's "close enough"? There was a similar issue previously where even though the sound and listener positions were set the same, because the values were so large some of internal transforms applied to the sound position was creating floating point rounding errors on some systems/compilers, which were larger than the approximately-zero allowance of 1.19209290e-07 (this was fixed on OpenAL Soft's side by changing to doubles instead of floats for certain calculations, thereby reducing the rounding error, but having a clear indication of which sounds should be head-relative would be a better fix).
I can otherwise make a similar fix for the OpenAL backend as was applied to the FMOD backend, though it feels kludgy.