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.zip rockbox-f6370726323c5e3351d23341be9fc0a5af950a67.tar.gz rockbox-f6370726323c5e3351d23341be9fc0a5af950a67.tar.bz2 rockbox-f6370726323c5e3351d23341be9fc0a5af950a67.tar.xz | |
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
@@ -953,17 +953,13 @@ void dsp_set_eq_precut(int precut) */ void dsp_set_eq_coefs(int band) { - const int *setting; - long gain; - unsigned long cutoff, q; - /* Adjust setting pointer to the band we actually want to change */ - setting = &global_settings.eq_band0_cutoff + (band * 3); + struct eq_band_setting *setting = &global_settings.eq_band_settings[band]; /* Convert user settings to format required by coef generator functions */ - cutoff = 0xffffffff / NATIVE_FREQUENCY * (*setting++); - q = *setting++; - gain = *setting++; + unsigned long cutoff = 0xffffffff / NATIVE_FREQUENCY * setting->cutoff; + unsigned long q = setting->q; + int gain = setting->gain; if (q == 0) q = 1; |