1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Thom Johansen 2007-02-26 00:41:26 +00:00
parent 1915c10994
commit a7fabf0741
9 changed files with 175 additions and 45 deletions

View file

@ -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