summaryrefslogtreecommitdiffstats
path: root/apps/menus
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2012-04-30 16:27:01 -0400
committerMichael Sevakis <jethead71@rockbox.org>2012-04-30 22:47:37 +0200
commit57a20d2d638895fffe88a23cbd2960f1102b292f (patch)
treedf1943429ec040a18d854fa0a0091051e4200304 /apps/menus
parenta32cbf33465367cd6fe36d636da8d03485e9d15d (diff)
downloadrockbox-57a20d2d638895fffe88a23cbd2960f1102b292f.tar.gz
rockbox-57a20d2d638895fffe88a23cbd2960f1102b292f.tar.bz2
rockbox-57a20d2d638895fffe88a23cbd2960f1102b292f.zip
Make DSP's replaygain independent of global_settings.
Moves replaygain definitions to lib/rbcodec/dsp/dsp_misc.h. Intermediate functions in misc.c handle any adjustment and calling the rbcodec APIs. Change-Id: I9f03561bca9aedd13760cf19c4e19aa3c68e7024 Reviewed-on: http://gerrit.rockbox.org/140 Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Diffstat (limited to 'apps/menus')
-rw-r--r--apps/menus/playback_menu.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/apps/menus/playback_menu.c b/apps/menus/playback_menu.c
index d1d999587b..6beda93991 100644
--- a/apps/menus/playback_menu.c
+++ b/apps/menus/playback_menu.c
@@ -34,6 +34,7 @@
#include "scrobbler.h"
#include "audio.h"
#include "cuesheet.h"
+#include "misc.h"
#if CONFIG_CODEC == SWCODEC
#include "playback.h"
#endif
@@ -116,14 +117,20 @@ static int replaygain_callback(int action,const struct menu_item_ex *this_item)
switch (action)
{
case ACTION_EXIT_MENUITEM: /* on exit */
- dsp_set_replaygain();
+ replaygain_update();
break;
}
return action;
}
-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);
+MENUITEM_SETTING(replaygain_noclip,
+ &global_settings.replaygain_settings.noclip,
+ replaygain_callback);
+MENUITEM_SETTING(replaygain_type,
+ &global_settings.replaygain_settings.type,
+ replaygain_callback);
+MENUITEM_SETTING(replaygain_preamp,
+ &global_settings.replaygain_settings.preamp,
+ replaygain_callback);
MAKE_MENU(replaygain_settings_menu,ID2P(LANG_REPLAYGAIN),0, Icon_NOICON,
&replaygain_type, &replaygain_noclip, &replaygain_preamp);
@@ -244,9 +251,8 @@ static int playback_callback(int action,const struct menu_item_ex *this_item)
if (old_shuffle == global_settings.playlist_shuffle)
break;
-#if CONFIG_CODEC == SWCODEC
- dsp_set_replaygain();
-#endif
+ replaygain_update();
+
if (global_settings.playlist_shuffle)
{
playlist_randomise(NULL, current_tick, true);