diff options
author | JSDurand <mmemmew@gmail.com> | 2021-07-12 12:07:30 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2021-07-12 12:07:30 +0800 |
commit | d073f301aa94cd7a8278681d8d723d74fa5d5d3f (patch) | |
tree | afb67e8393307c5bec32ac7f8444854a8b3e6cd0 /mix.c | |
parent | 75a875116f7060e5a0512b447123253d3c25946a (diff) |
Use double instead of float
I thought that a float has more precision than a double. Silly me.
Diffstat (limited to 'mix.c')
-rw-r--r-- | mix.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -10,13 +10,12 @@ U_ATTR Pulse mix_sound(Wave w, LENT n) { - Pulse result = 0.0f;; + Pulse result = 0.0; for (LENT i = 0; i < n;) result += *(w+i++); - result /= (float) n; + result /= (NUMT) n; return result; } - |