diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-07-05 18:06:07 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-07-05 18:06:07 +0000 |
commit | 802743a061e01150db544c8e072cd794731b18a7 (patch) | |
tree | 311abcc9e51973907899a4585dd0e3a2a31572eb /apps/dsp.c | |
parent | 427bf0b8936f2654fe79e8c5864918530b8838dd (diff) | |
download | rockbox-802743a061e01150db544c8e072cd794731b18a7.tar.gz rockbox-802743a061e01150db544c8e072cd794731b18a7.zip |
Take 2 at 'Consolidate all fixed point math routines in one library' (FS#10400) by Jeffrey Goode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21664 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/dsp.c')
-rw-r--r-- | apps/dsp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/dsp.c b/apps/dsp.c index a760865afb..30b4ed357b 100644 --- a/apps/dsp.c +++ b/apps/dsp.c | |||
@@ -33,6 +33,8 @@ | |||
33 | #include "misc.h" | 33 | #include "misc.h" |
34 | #include "tdspeed.h" | 34 | #include "tdspeed.h" |
35 | #include "buffer.h" | 35 | #include "buffer.h" |
36 | #include "fixedpoint.h" | ||
37 | #include "fracmul.h" | ||
36 | 38 | ||
37 | /* 16-bit samples are scaled based on these constants. The shift should be | 39 | /* 16-bit samples are scaled based on these constants. The shift should be |
38 | * no more than 15. | 40 | * no more than 15. |
@@ -841,7 +843,7 @@ void dsp_set_crossfeed_cross_params(long lf_gain, long hf_gain, long cutoff) | |||
841 | * crossfeed shelf filter and should be removed if crossfeed settings are | 843 | * crossfeed shelf filter and should be removed if crossfeed settings are |
842 | * ever made incompatible for any other good reason. | 844 | * ever made incompatible for any other good reason. |
843 | */ | 845 | */ |
844 | cutoff = DIV64(cutoff, get_replaygain_int(hf_gain*5), 24); | 846 | cutoff = fp_div(cutoff, get_replaygain_int(hf_gain*5), 24); |
845 | filter_shelf_coefs(cutoff, hf_gain, false, c); | 847 | filter_shelf_coefs(cutoff, hf_gain, false, c); |
846 | /* Scale coefs by LF gain and shift them to s0.31 format. We have no gains | 848 | /* Scale coefs by LF gain and shift them to s0.31 format. We have no gains |
847 | * over 1 and can do this safely | 849 | * over 1 and can do this safely |