diff options
| author | Thom Johansen <thomj@rockbox.org> | 2007-02-26 00:41:26 +0000 |
|---|---|---|
| committer | Thom Johansen <thomj@rockbox.org> | 2007-02-26 00:41:26 +0000 |
| commit | a7fabf0741c91fb0a2c28b2d8357bcc4630300af (patch) | |
| tree | e1528a67f63933aa23ebb7b5d809e1ce7e60b589 /apps/settings.c | |
| parent | 1915c1099431294ca9c43bc11fb1bfa41bbd83cc (diff) | |
| download | rockbox-a7fabf0741c91fb0a2c28b2d8357bcc4630300af.zip rockbox-a7fabf0741c91fb0a2c28b2d8357bcc4630300af.tar.gz rockbox-a7fabf0741c91fb0a2c28b2d8357bcc4630300af.tar.bz2 rockbox-a7fabf0741c91fb0a2c28b2d8357bcc4630300af.tar.xz | |
Add software based bass/treble controls for targets which have no such functionality in hardware (currently only X5). They can also be used on any other SWCODEC target by adding #define HAVE_SW_TONE_CONTROLS in the relevant config-*.h file. Also remove some now unneeded zero checks when using get_replaygain_int(). Comments on sound quality are welcome as some parameters can still be fine-tuned.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12489 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings.c')
| -rw-r--r-- | apps/settings.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/settings.c b/apps/settings.c index dd5e7c5..cc5ab12 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -642,6 +642,9 @@ void settings_apply_pm_range(void) void sound_settings_apply(void) { +#ifdef HAVE_SW_TONE_CONTROLS + sound_set_dsp_callback(dsp_callback); +#endif sound_set(SOUND_BASS, global_settings.bass); sound_set(SOUND_TREBLE, global_settings.treble); sound_set(SOUND_BALANCE, global_settings.balance); @@ -967,7 +970,7 @@ bool set_sound(const unsigned char * string, talkunit = UNIT_PERCENT; else if (*unit == 'H') talkunit = UNIT_HERTZ; - if(!numdec) + if (!numdec) #if CONFIG_CODEC == SWCODEC /* We need to hijack this one and send it off to apps/dsp.c instead of firmware/sound.c */ @@ -975,7 +978,7 @@ bool set_sound(const unsigned char * string, return set_int(string, unit, talkunit, variable, &stereo_width_set, steps, min, max, NULL ); else -#endif +#endif return set_int(string, unit, talkunit, variable, sound_callback, steps, min, max, NULL ); else |