summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/spatial.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/spatial.c b/src/spatial.c
index 2d1fbe3..d7c6291 100644
--- a/src/spatial.c
+++ b/src/spatial.c
@@ -38,7 +38,7 @@ error_realloc_buffer:
}
static inline size_t sample_delta(xas_spatial_scene *scene, float distance) {
- return floorf(distance / scene->speed / scene->format.sample_rate);
+ return floorf((distance / scene->speed) * scene->format.sample_rate);
}
static inline int16_t sample_scale(int16_t value, float distance) {