diff options
author | Brandon Low <lostlogic@rockbox.org> | 2006-01-29 02:46:18 +0000 |
---|---|---|
committer | Brandon Low <lostlogic@rockbox.org> | 2006-01-29 02:46:18 +0000 |
commit | 236d52410f36a0a9202ca99c1865a8ff59895254 (patch) | |
tree | 876edc77877cc2ff6a12294de09904d706f54e0d /apps/dsp.c | |
parent | a8cc6a74547e6485f3aa9fe597f5d1dc176cca8a (diff) | |
download | rockbox-236d52410f36a0a9202ca99c1865a8ff59895254.tar.gz rockbox-236d52410f36a0a9202ca99c1865a8ff59895254.zip |
Backout part of the last change to fix builds for now
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8479 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/dsp.c')
-rw-r--r-- | apps/dsp.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/apps/dsp.c b/apps/dsp.c index b2fc0ce7a2..19cb669a06 100644 --- a/apps/dsp.c +++ b/apps/dsp.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <inttypes.h> | 19 | #include <inttypes.h> |
20 | #include <string.h> | 20 | #include <string.h> |
21 | #include "dsp.h" | 21 | #include "dsp.h" |
22 | #include "eq.h" | ||
23 | #include "kernel.h" | 22 | #include "kernel.h" |
24 | #include "playback.h" | 23 | #include "playback.h" |
25 | #include "system.h" | 24 | #include "system.h" |
@@ -167,21 +166,10 @@ struct crossfeed_data | |||
167 | int index; | 166 | int index; |
168 | }; | 167 | }; |
169 | 168 | ||
170 | /* Current setup is one lowshelf filters, three peaking filters and one | ||
171 | highshelf filter. Varying the number of shelving filters make no sense, | ||
172 | but adding peaking filters are possible. */ | ||
173 | struct eq_state { | ||
174 | char enabled[5]; /* Flags for active filters */ | ||
175 | struct eqfilter ls; | ||
176 | struct eqfilter pk[3]; | ||
177 | struct eqfilter hs; | ||
178 | }; | ||
179 | |||
180 | static struct dsp_config dsp_conf[2] IBSS_ATTR; | 169 | static struct dsp_config dsp_conf[2] IBSS_ATTR; |
181 | static struct dither_data dither_data[2] IBSS_ATTR; | 170 | static struct dither_data dither_data[2] IBSS_ATTR; |
182 | static struct resample_data resample_data[2] IBSS_ATTR; | 171 | static struct resample_data resample_data[2] IBSS_ATTR; |
183 | struct crossfeed_data crossfeed_data IBSS_ATTR; | 172 | struct crossfeed_data crossfeed_data IBSS_ATTR; |
184 | static struct eq_state eq_data; | ||
185 | 173 | ||
186 | static int pitch_ratio = 1000; | 174 | static int pitch_ratio = 1000; |
187 | 175 | ||
@@ -620,25 +608,6 @@ static void apply_crossfeed(long* src[], int count) | |||
620 | } | 608 | } |
621 | #endif | 609 | #endif |
622 | 610 | ||
623 | /* Apply EQ filters to those bands that have got it switched on. */ | ||
624 | void eq_process(long **x, unsigned num) | ||
625 | { | ||
626 | int i; | ||
627 | unsigned int channels = dsp->stereo_mode != STEREO_MONO ? 2 : 1; | ||
628 | |||
629 | /* filter configuration currently is 1 low shelf filter, 3 band peaking | ||
630 | filters and 1 high shelf filter, in that order. | ||
631 | */ | ||
632 | if (eq_data.enabled[0]) | ||
633 | eq_filter(x, &eq_data.ls, num, channels, EQ_SHELF_SHIFT); | ||
634 | for (i = 0; i < 3; i++) { | ||
635 | if (eq_data.enabled[1 + i]) | ||
636 | eq_filter(x, &eq_data.pk[i], num, channels, EQ_PEAK_SHIFT); | ||
637 | } | ||
638 | if (eq_data.enabled[4]) | ||
639 | eq_filter(x, &eq_data.hs, num, channels, EQ_SHELF_SHIFT); | ||
640 | } | ||
641 | |||
642 | /* Apply a constant gain to the samples (e.g., for ReplayGain). May update | 611 | /* Apply a constant gain to the samples (e.g., for ReplayGain). May update |
643 | * the src array if gain was applied. | 612 | * the src array if gain was applied. |
644 | * Note that this must be called before the resampler. | 613 | * Note that this must be called before the resampler. |
@@ -744,9 +713,6 @@ long dsp_process(char* dst, char* src[], long size) | |||
744 | samples = resample(tmp, samples); | 713 | samples = resample(tmp, samples); |
745 | if (dsp->crossfeed_enabled && dsp->stereo_mode != STEREO_MONO) | 714 | if (dsp->crossfeed_enabled && dsp->stereo_mode != STEREO_MONO) |
746 | apply_crossfeed(tmp, samples); | 715 | apply_crossfeed(tmp, samples); |
747 | /* TODO: Might want to wrap this with a generic eq_enabled when the | ||
748 | settings are in place */ | ||
749 | eq_process(tmp, samples); | ||
750 | write_samples((short*) dst, tmp, samples); | 716 | write_samples((short*) dst, tmp, samples); |
751 | written += samples; | 717 | written += samples; |
752 | dst += samples * sizeof(short) * 2; | 718 | dst += samples * sizeof(short) * 2; |