summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXANTRONIX Development2022-02-16 00:23:07 -0500
committerXANTRONIX Development2022-02-16 00:23:07 -0500
commitb31d28687a54b8786b5df44e8039b21702a68296 (patch)
tree9bee22328cb5159cf29d166f5f38a05fbafa847c
parentffc037827776902f667cf975bba0078321d1ecf0 (diff)
downloadxas-b31d28687a54b8786b5df44e8039b21702a68296.tar.gz
xas-b31d28687a54b8786b5df44e8039b21702a68296.tar.bz2
xas-b31d28687a54b8786b5df44e8039b21702a68296.zip
Change way of calculating amplitude by distance
-rw-r--r--src/spatial.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/spatial.c b/src/spatial.c
index 36422b8..2d1fbe3 100644
--- a/src/spatial.c
+++ b/src/spatial.c
@@ -42,7 +42,7 @@ static inline size_t sample_delta(xas_spatial_scene *scene, float distance) {
}
static inline int16_t sample_scale(int16_t value, float distance) {
- return (int16_t)roundf((float)value * (1.0f / powf(distance, 2.0)));
+ return (int16_t)roundf((float)value * (1.0f / distance));
}
static void buffer_zero(xas_spatial_buffer *buffer, size_t count) {