In these formulas there is I think mistake that reverses lift/right:
https://github.com/RustAudio/rodio/blame/a352fb53846b47523d828b276b6d625f251aabb2/src/source/spatial.rs#L60-L62
let left_diff_modifier = (((left_dist - right_dist) / max_diff + 1.0) / 4.0 + 0.5).min(1.0);
let right_diff_modifier =
(((right_dist - left_dist) / max_diff + 1.0) / 4.0 + 0.5).min(1.0);
It basically says that if "left_dist" (distance from emitter to "left" listener) is bigger - then modifier to left is bigger (farther - louder, which should be the other way around, i.e closer - louder).
And same for the right.
Essentially at close distances this results in swap in sound - left feels like right and vice versa..
I think it should be
let left_diff_modifier = (((right_dist - left_dist) / max_diff + 1.0) / 4.0 + 0.5).min(1.0);
let right_diff_modifier =
(((left_dist - right_dist) / max_diff + 1.0) / 4.0 + 0.5).min(1.0);
It sort of appears to be obvious mistake in that code, am I missing something here?
In these formulas there is I think mistake that reverses lift/right:
https://github.com/RustAudio/rodio/blame/a352fb53846b47523d828b276b6d625f251aabb2/src/source/spatial.rs#L60-L62
It basically says that if "left_dist" (distance from emitter to "left" listener) is bigger - then modifier to left is bigger (farther - louder, which should be the other way around, i.e closer - louder).
And same for the right.
Essentially at close distances this results in swap in sound - left feels like right and vice versa..
I think it should be
It sort of appears to be obvious mistake in that code, am I missing something here?