forked from len0rd/rockbox
Sound settings rework: * Put all fixed parameters (unit, decimals, step, min, max, default, set function) for the individual settings into one structure array. * Use the new individual sound setting functions where appropriate. * Added dummy sound setting functions and defined the codec type for the sims. Fixes wrong sound settings ranges in the simulators. * Code cleanup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7770 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4d9be96a81
commit
8051a0b724
21 changed files with 250 additions and 333 deletions
|
|
@ -62,13 +62,13 @@ bool set_sound(const char* string,
|
|||
int steps = sound_steps(setting);
|
||||
int min = sound_min(setting);
|
||||
int max = sound_max(setting);
|
||||
void(*sound_callback)(int)=sound_get_fn(setting);
|
||||
sound_set_type* sound_callback = sound_get_fn(setting);
|
||||
if (*unit == 'd') /* crude reconstruction */
|
||||
talkunit = UNIT_DB;
|
||||
else if (*unit == '%')
|
||||
talkunit = UNIT_PERCENT;
|
||||
else if (*unit == 'H')
|
||||
talkunit = UNIT_HERTZ;
|
||||
talkunit = UNIT_HERTZ;
|
||||
if(!numdec)
|
||||
return set_int(string, unit, talkunit, variable, sound_callback,
|
||||
steps, min, max, NULL );
|
||||
|
|
@ -134,7 +134,7 @@ static bool mdb_shape(void)
|
|||
|
||||
static void set_mdb_enable(bool value)
|
||||
{
|
||||
sound_set(SOUND_MDB_ENABLE, (int)value);
|
||||
sound_set_mdb_enable((int)value);
|
||||
}
|
||||
|
||||
static bool mdb_enable(void)
|
||||
|
|
@ -148,7 +148,7 @@ static bool mdb_enable(void)
|
|||
|
||||
static void set_superbass(bool value)
|
||||
{
|
||||
sound_set(SOUND_SUPERBASS, (int)value);
|
||||
sound_set_superbass((int)value);
|
||||
}
|
||||
|
||||
static bool superbass(void)
|
||||
|
|
@ -160,11 +160,6 @@ static bool superbass(void)
|
|||
set_superbass);
|
||||
}
|
||||
|
||||
static void set_avc(int val)
|
||||
{
|
||||
sound_set(SOUND_AVC, val);
|
||||
}
|
||||
|
||||
static bool avc(void)
|
||||
{
|
||||
static const struct opt_items names[] = {
|
||||
|
|
@ -175,7 +170,7 @@ static bool avc(void)
|
|||
{ "8s", TALK_ID(8, UNIT_SEC) }
|
||||
};
|
||||
return set_option(str(LANG_DECAY), &global_settings.avc, INT,
|
||||
names, 5, set_avc);
|
||||
names, 5, sound_set_avc);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -317,11 +312,6 @@ static bool reconstartup(void)
|
|||
|
||||
#endif /* MAS3587F */
|
||||
|
||||
static void set_chanconf(int val)
|
||||
{
|
||||
sound_set(SOUND_CHANNELS, val);
|
||||
}
|
||||
|
||||
static bool chanconf(void)
|
||||
{
|
||||
static const struct opt_items names[] = {
|
||||
|
|
@ -333,7 +323,7 @@ static bool chanconf(void)
|
|||
{ STR(LANG_CHANNEL_KARAOKE) }
|
||||
};
|
||||
return set_option(str(LANG_CHANNEL), &global_settings.channel_config, INT,
|
||||
names, 6, set_chanconf );
|
||||
names, 6, sound_set_channels);
|
||||
}
|
||||
|
||||
static bool stereo_width(void)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue