summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorAlexander Levin <al.le@rockbox.org>2009-06-20 21:13:24 +0000
committerAlexander Levin <al.le@rockbox.org>2009-06-20 21:13:24 +0000
commit8589fcb3e3e0744b208ce5e8099fdf12e46ba9c2 (patch)
treeaac31dccb328366674c0284cba2d9a86ca3dfe4e /apps
parent01bcd2c6121fa0ae1797ef11c02be298574f4fdb (diff)
downloadrockbox-8589fcb3e3e0744b208ce5e8099fdf12e46ba9c2.zip
rockbox-8589fcb3e3e0744b208ce5e8099fdf12e46ba9c2.tar.gz
rockbox-8589fcb3e3e0744b208ce5e8099fdf12e46ba9c2.tar.bz2
rockbox-8589fcb3e3e0744b208ce5e8099fdf12e46ba9c2.tar.xz
Merge the "Replaygain Off" option into the replaygain type; eliminate the "On/Off" setting (FS#10356). All WPS tags should work as before.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21414 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/dsp.c5
-rw-r--r--apps/gui/gwps-common.c2
-rw-r--r--apps/menus/playback_menu.c4
-rw-r--r--apps/settings.h6
-rw-r--r--apps/settings_list.c6
5 files changed, 10 insertions, 13 deletions
diff --git a/apps/dsp.c b/apps/dsp.c
index 0bb3ac0..a760865 100644
--- a/apps/dsp.c
+++ b/apps/dsp.c
@@ -1449,13 +1449,14 @@ void dsp_set_replaygain(void)
new_gain = false;
- if (global_settings.replaygain || global_settings.replaygain_noclip)
+ if ((global_settings.replaygain_type != REPLAYGAIN_OFF) ||
+ global_settings.replaygain_noclip)
{
bool track_mode = get_replaygain_mode(track_gain != 0,
album_gain != 0) == REPLAYGAIN_TRACK;
long peak = (track_mode || !album_peak) ? track_peak : album_peak;
- if (global_settings.replaygain)
+ if (global_settings.replaygain_type != REPLAYGAIN_OFF)
{
gain = (track_mode || !album_gain) ? track_gain : album_gain;
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index 9cfff4c..f480f61 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -1227,7 +1227,7 @@ static const char *get_token_value(struct gui_wps *gwps,
{
int val;
- if (global_settings.replaygain == 0)
+ if (global_settings.replaygain_type == REPLAYGAIN_OFF)
val = 1; /* off */
else
{
diff --git a/apps/menus/playback_menu.c b/apps/menus/playback_menu.c
index 02e29b1..28e8601 100644
--- a/apps/menus/playback_menu.c
+++ b/apps/menus/playback_menu.c
@@ -120,13 +120,11 @@ static int replaygain_callback(int action,const struct menu_item_ex *this_item)
}
return action;
}
-MENUITEM_SETTING(replaygain, &global_settings.replaygain ,replaygain_callback);
MENUITEM_SETTING(replaygain_noclip, &global_settings.replaygain_noclip ,replaygain_callback);
MENUITEM_SETTING(replaygain_type, &global_settings.replaygain_type ,replaygain_callback);
MENUITEM_SETTING(replaygain_preamp, &global_settings.replaygain_preamp ,replaygain_callback);
MAKE_MENU(replaygain_settings_menu,ID2P(LANG_REPLAYGAIN),0, Icon_NOICON,
- &replaygain,&replaygain_noclip,
- &replaygain_type,&replaygain_preamp);
+ &replaygain_type, &replaygain_noclip, &replaygain_preamp);
MENUITEM_SETTING(beep, &global_settings.beep ,NULL);
#endif /* CONFIG_CODEC == SWCODEC */
diff --git a/apps/settings.h b/apps/settings.h
index ef5a620..e0ee416 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -126,6 +126,7 @@ enum
NUM_REPEAT_MODES
};
+
/* dir filter options */
/* Note: Any new filter modes need to be added before NUM_FILTER_MODES.
* Any new rockbox browse filter modes (accessible through the menu)
@@ -143,7 +144,7 @@ enum { SORT_INTERPRET_AS_DIGIT, SORT_INTERPRET_AS_NUMBER };
enum { RECURSE_OFF, RECURSE_ON, RECURSE_ASK };
/* replaygain types */
-enum { REPLAYGAIN_TRACK = 0, REPLAYGAIN_ALBUM, REPLAYGAIN_SHUFFLE };
+enum { REPLAYGAIN_TRACK = 0, REPLAYGAIN_ALBUM, REPLAYGAIN_SHUFFLE, REPLAYGAIN_OFF };
/* show path types */
enum { SHOW_PATH_OFF = 0, SHOW_PATH_CURRENT, SHOW_PATH_FULL };
@@ -324,10 +325,9 @@ struct user_settings
int crossfade_fade_out_mixmode; /* Fade out mode (0=crossfade,1=mix) */
/* Replaygain */
- bool replaygain; /* enable replaygain */
bool replaygain_noclip; /* scale to prevent clips */
int replaygain_type; /* 0=track gain, 1=album gain, 2=track gain if
- shuffle is on, album gain otherwise */
+ shuffle is on, album gain otherwise, 4=off */
int replaygain_preamp; /* scale replaygained tracks by this */
/* Crossfeed */
diff --git a/apps/settings_list.c b/apps/settings_list.c
index dcad718..9e40cbd 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -1108,12 +1108,10 @@ const struct settings_list settings[] = {
#if CONFIG_CODEC == SWCODEC
/* replay gain */
- OFFON_SETTING(F_SOUNDSETTING, replaygain, LANG_REPLAYGAIN_ENABLE, true,
- "replaygain", NULL),
CHOICE_SETTING(F_SOUNDSETTING, replaygain_type, LANG_REPLAYGAIN_MODE,
REPLAYGAIN_SHUFFLE, "replaygain type",
- "track,album,track shuffle", NULL, 3, ID2P(LANG_TRACK_GAIN),
- ID2P(LANG_ALBUM_GAIN), ID2P(LANG_SHUFFLE_GAIN)),
+ "track,album,track shuffle,off", NULL, 4, ID2P(LANG_TRACK_GAIN),
+ ID2P(LANG_ALBUM_GAIN), ID2P(LANG_SHUFFLE_GAIN), ID2P(LANG_OFF)),
OFFON_SETTING(F_SOUNDSETTING, replaygain_noclip, LANG_REPLAYGAIN_NOCLIP,
false, "replaygain noclip", NULL),
INT_SETTING_NOWRAP(F_SOUNDSETTING, replaygain_preamp,