diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2012-03-09 16:38:33 -0500 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2012-03-12 00:18:33 +0100 |
commit | f6370726323c5e3351d23341be9fc0a5af950a67 (patch) | |
tree | 1a74e96a494f68cadddec9942b600c98bdd9bd49 /apps/dsp.c | |
parent | 64bb720edf8a738685c9f0a18957a1b15e984cf6 (diff) | |
download | rockbox-f6370726323c5e3351d23341be9fc0a5af950a67.tar.gz rockbox-f6370726323c5e3351d23341be9fc0a5af950a67.zip |
Change EQ settings to use a struct array in global_settings.
The previous pseudo array access of separate members wasn't very
nice or clear.
Change-Id: I74a2b39bb9c71a1370a455c01c4d5a860765e040
Reviewed-on: http://gerrit.rockbox.org/179
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested-by: Michael Sevakis <jethead71@rockbox.org>
Diffstat (limited to 'apps/dsp.c')
-rw-r--r-- | apps/dsp.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/apps/dsp.c b/apps/dsp.c index 4017f6afc0..4da555747b 100644 --- a/apps/dsp.c +++ b/apps/dsp.c | |||
@@ -953,17 +953,13 @@ void dsp_set_eq_precut(int precut) | |||
953 | */ | 953 | */ |
954 | void dsp_set_eq_coefs(int band) | 954 | void dsp_set_eq_coefs(int band) |
955 | { | 955 | { |
956 | const int *setting; | ||
957 | long gain; | ||
958 | unsigned long cutoff, q; | ||
959 | |||
960 | /* Adjust setting pointer to the band we actually want to change */ | 956 | /* Adjust setting pointer to the band we actually want to change */ |
961 | setting = &global_settings.eq_band0_cutoff + (band * 3); | 957 | struct eq_band_setting *setting = &global_settings.eq_band_settings[band]; |
962 | 958 | ||
963 | /* Convert user settings to format required by coef generator functions */ | 959 | /* Convert user settings to format required by coef generator functions */ |
964 | cutoff = 0xffffffff / NATIVE_FREQUENCY * (*setting++); | 960 | unsigned long cutoff = 0xffffffff / NATIVE_FREQUENCY * setting->cutoff; |
965 | q = *setting++; | 961 | unsigned long q = setting->q; |
966 | gain = *setting++; | 962 | int gain = setting->gain; |
967 | 963 | ||
968 | if (q == 0) | 964 | if (q == 0) |
969 | q = 1; | 965 | q = 1; |