Mercurial > hg > dmlib
changeset 776:9acebca96dcc
Adjust frequency computation formula.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 23 May 2013 23:48:24 +0300 |
parents | 4ff7d7f6f4d1 |
children | ed60a7ee3ebb |
files | minijss/jssplr.c |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/minijss/jssplr.c Thu May 23 23:47:21 2013 +0300 +++ b/minijss/jssplr.c Thu May 23 23:48:24 2013 +0300 @@ -5,9 +5,6 @@ */ #include "jssplr.h" -// FIXME!! FIX ME! -#include <math.h> - /* Miscellaneous tables */ static const Uint8 jmpSineTab[32] = @@ -100,7 +97,8 @@ else { // Frequency = Frequency = 8363*2^((6*12*16*4 - Period) / (12*16*4)) - chn->cfreq = chn->freq = 8363.0f * pow(2.0f, (4608.0f - (double) value) / 768.0f); + //chn->cfreq = chn->freq = 8363.0f * pow(2.0f, (4608.0f - (double) value) / 768.0f); + chn->cfreq = chn->freq = 8363 * (1 << ((4608 - value) / 768)); } JMPSETNDFLAGS(cdfNewFreq);