Make more sound related settings that might damage your ears not wrap.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15846 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dan Everton 2007-11-29 09:19:08 +00:00
parent 9fe5633789
commit 0c2ff76766

View file

@ -141,6 +141,12 @@
lang_id, INT(default), name, NULL, \
{.int_setting = (struct int_setting[]){ \
{cb, unit, min, max, step, formatter, get_talk_id}}}}
#define INT_SETTING_NOWRAP(flags, var, lang_id, default, name, \
unit, min, max, step, formatter, get_talk_id, cb) \
{flags|F_INT_SETTING|F_T_INT|F_NO_WRAP, &global_settings.var, \
lang_id, INT(default), name, NULL, \
{.int_setting = (struct int_setting[]){ \
{cb, unit, min, max, step, formatter, get_talk_id}}}}
#define TABLE_SETTING(flags, var, lang_id, default, name, cfg_vals, \
unit, formatter, get_talk_id, cb, count, ...) \
@ -860,7 +866,7 @@ const struct settings_list settings[] = {
ID2P(LANG_TRACK_GAIN), ID2P(LANG_ALBUM_GAIN), ID2P(LANG_SHUFFLE_GAIN)),
OFFON_SETTING(0, replaygain_noclip, LANG_REPLAYGAIN_NOCLIP,
false, "replaygain noclip", NULL),
INT_SETTING(0, replaygain_preamp, LANG_REPLAYGAIN_PREAMP, 0, "replaygain preamp",
INT_SETTING_NOWRAP(0, replaygain_preamp, LANG_REPLAYGAIN_PREAMP, 0, "replaygain preamp",
UNIT_DB, -120, 120, 5, replaygain_preamp_format, NULL, NULL),
CHOICE_SETTING(0, beep, LANG_BEEP, 0,
@ -887,68 +893,68 @@ const struct settings_list settings[] = {
/* crossfeed */
OFFON_SETTING(0,crossfeed, LANG_CROSSFEED, false,
"crossfeed", dsp_set_crossfeed),
INT_SETTING(0, crossfeed_direct_gain, LANG_CROSSFEED_DIRECT_GAIN, 15,
INT_SETTING_NOWRAP(0, crossfeed_direct_gain, LANG_CROSSFEED_DIRECT_GAIN, 15,
"crossfeed direct gain", UNIT_DB, 0, 60, 5,
crossfeed_format, NULL, dsp_set_crossfeed_direct_gain),
INT_SETTING(0, crossfeed_cross_gain, LANG_CROSSFEED_CROSS_GAIN, 60,
INT_SETTING_NOWRAP(0, crossfeed_cross_gain, LANG_CROSSFEED_CROSS_GAIN, 60,
"crossfeed cross gain", UNIT_DB, 30, 120, 5,
crossfeed_format, NULL, crossfeed_cross_set),
INT_SETTING(0, crossfeed_hf_attenuation, LANG_CROSSFEED_HF_ATTENUATION, 160,
INT_SETTING_NOWRAP(0, crossfeed_hf_attenuation, LANG_CROSSFEED_HF_ATTENUATION, 160,
"crossfeed hf attenuation", UNIT_DB, 60, 240, 5,
crossfeed_format, NULL, crossfeed_cross_set),
INT_SETTING(0, crossfeed_hf_cutoff, LANG_CROSSFEED_HF_CUTOFF, 700,
INT_SETTING_NOWRAP(0, crossfeed_hf_cutoff, LANG_CROSSFEED_HF_CUTOFF, 700,
"crossfeed hf cutoff", UNIT_HERTZ, 500, 2000, 100,
NULL, NULL, crossfeed_cross_set),
/* equalizer */
OFFON_SETTING(0,eq_enabled,LANG_EQUALIZER_ENABLED,false,"eq enabled",NULL),
INT_SETTING(0, eq_precut, LANG_EQUALIZER_PRECUT, 0, "eq precut",
INT_SETTING_NOWRAP(0, eq_precut, LANG_EQUALIZER_PRECUT, 0, "eq precut",
UNIT_DB, 0, 240, 5, eq_precut_format, NULL, dsp_set_eq_precut),
/* 0..32768 Hz */
INT_SETTING(0, eq_band0_cutoff, LANG_EQUALIZER_BAND_CUTOFF, 60, "eq band 0 cutoff",
UNIT_HERTZ, EQ_CUTOFF_MIN, EQ_CUTOFF_MAX, EQ_CUTOFF_STEP,
NULL, NULL, NULL),
INT_SETTING(0, eq_band1_cutoff, LANG_EQUALIZER_BAND_CENTER, 200, "eq band 1 cutoff",
UNIT_HERTZ, EQ_CUTOFF_MIN, EQ_CUTOFF_MAX, EQ_CUTOFF_STEP,
NULL, NULL, NULL),
INT_SETTING(0, eq_band2_cutoff, LANG_EQUALIZER_BAND_CENTER, 800, "eq band 2 cutoff",
UNIT_HERTZ, EQ_CUTOFF_MIN, EQ_CUTOFF_MAX, EQ_CUTOFF_STEP,
NULL, NULL, NULL),
INT_SETTING(0, eq_band3_cutoff, LANG_EQUALIZER_BAND_CENTER, 4000, "eq band 3 cutoff",
UNIT_HERTZ, EQ_CUTOFF_MIN, EQ_CUTOFF_MAX, EQ_CUTOFF_STEP,
NULL, NULL, NULL),
INT_SETTING(0, eq_band4_cutoff, LANG_EQUALIZER_BAND_CUTOFF, 12000, "eq band 4 cutoff",
UNIT_HERTZ, EQ_CUTOFF_MIN, EQ_CUTOFF_MAX, EQ_CUTOFF_STEP,
NULL, NULL, NULL),
INT_SETTING_NOWRAP(0, eq_band0_cutoff, LANG_EQUALIZER_BAND_CUTOFF, 60,
"eq band 0 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL),
INT_SETTING_NOWRAP(0, eq_band1_cutoff, LANG_EQUALIZER_BAND_CENTER, 200,
"eq band 1 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL),
INT_SETTING_NOWRAP(0, eq_band2_cutoff, LANG_EQUALIZER_BAND_CENTER, 800,
"eq band 2 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL),
INT_SETTING_NOWRAP(0, eq_band3_cutoff, LANG_EQUALIZER_BAND_CENTER, 4000,
"eq band 3 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL),
INT_SETTING_NOWRAP(0, eq_band4_cutoff, LANG_EQUALIZER_BAND_CUTOFF, 12000,
"eq band 4 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL),
/* 0..64 (or 0.0 to 6.4) */
INT_SETTING(0, eq_band0_q, LANG_EQUALIZER_BAND_Q, 7, "eq band 0 q",
INT_SETTING_NOWRAP(0, eq_band0_q, LANG_EQUALIZER_BAND_Q, 7, "eq band 0 q",
UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
eq_q_format, NULL, NULL),
INT_SETTING(0, eq_band1_q, LANG_EQUALIZER_BAND_Q, 10, "eq band 1 q",
INT_SETTING_NOWRAP(0, eq_band1_q, LANG_EQUALIZER_BAND_Q, 10, "eq band 1 q",
UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
eq_q_format, NULL, NULL),
INT_SETTING(0, eq_band2_q, LANG_EQUALIZER_BAND_Q, 10, "eq band 2 q",
INT_SETTING_NOWRAP(0, eq_band2_q, LANG_EQUALIZER_BAND_Q, 10, "eq band 2 q",
UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
eq_q_format, NULL, NULL),
INT_SETTING(0, eq_band3_q, LANG_EQUALIZER_BAND_Q, 10, "eq band 3 q",
INT_SETTING_NOWRAP(0, eq_band3_q, LANG_EQUALIZER_BAND_Q, 10, "eq band 3 q",
UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
eq_q_format, NULL, NULL),
INT_SETTING(0, eq_band4_q, LANG_EQUALIZER_BAND_Q, 7, "eq band 4 q",
INT_SETTING_NOWRAP(0, eq_band4_q, LANG_EQUALIZER_BAND_Q, 7, "eq band 4 q",
UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
eq_q_format, NULL, NULL),
/* -240..240 (or -24db to +24db) */
INT_SETTING(0, eq_band0_gain, LANG_GAIN, 0, "eq band 0 gain",
INT_SETTING_NOWRAP(0, eq_band0_gain, LANG_GAIN, 0, "eq band 0 gain",
UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP,
eq_gain_format, NULL, NULL),
INT_SETTING(0, eq_band1_gain, LANG_GAIN, 0, "eq band 1 gain",
INT_SETTING_NOWRAP(0, eq_band1_gain, LANG_GAIN, 0, "eq band 1 gain",
UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP,
eq_gain_format, NULL, NULL),
INT_SETTING(0, eq_band2_gain, LANG_GAIN, 0, "eq band 2 gain",
INT_SETTING_NOWRAP(0, eq_band2_gain, LANG_GAIN, 0, "eq band 2 gain",
UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP,
eq_gain_format, NULL, NULL),
INT_SETTING(0, eq_band3_gain, LANG_GAIN, 0, "eq band 3 gain",
INT_SETTING_NOWRAP(0, eq_band3_gain, LANG_GAIN, 0, "eq band 3 gain",
UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP,
eq_gain_format, NULL, NULL),
INT_SETTING(0, eq_band4_gain, LANG_GAIN, 0, "eq band 4 gain",
INT_SETTING_NOWRAP(0, eq_band4_gain, LANG_GAIN, 0, "eq band 4 gain",
UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP,
eq_gain_format, NULL, NULL),