steam-audio
steam-audio copied to clipboard
Fix minor issues in SOFA interpolation
Hi!
We discovered these minor bugs while using a SOFA file with 2 spheres of data, distinguishing between far-field and near-field audio. The distance was not interpolated correctly, since it assumed either data that would wrap around or had at least 3 spheres. This fix guarantees that r will be considered for interpolation even with 2 spheres. When outside the outer one, or inside the inner, the existing clamp(0, 1) in the actual linear interpolation takes care of ignoring the other one as expected.
The other fix is what I assume is a typo in azimuth wrapping. Very minor audible impact, if at all, as far as I can tell.
Thanks!