diff options
Diffstat (limited to 'apps/misc.c')
-rw-r--r-- | apps/misc.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/misc.c b/apps/misc.c index 80c4588f0f..709bc49208 100644 --- a/apps/misc.c +++ b/apps/misc.c | |||
@@ -802,3 +802,19 @@ int show_logo( void ) | |||
802 | 802 | ||
803 | return 0; | 803 | return 0; |
804 | } | 804 | } |
805 | |||
806 | #if CONFIG_CODEC == SWCODEC | ||
807 | int get_replaygain_mode(bool have_track_gain, bool have_album_gain) | ||
808 | { | ||
809 | int type; | ||
810 | |||
811 | bool track = ((global_settings.replaygain_type == REPLAYGAIN_TRACK) | ||
812 | || ((global_settings.replaygain_type == REPLAYGAIN_SHUFFLE) | ||
813 | && global_settings.playlist_shuffle)); | ||
814 | |||
815 | type = (!track && have_album_gain) ? REPLAYGAIN_ALBUM | ||
816 | : have_track_gain ? REPLAYGAIN_TRACK : -1; | ||
817 | |||
818 | return type; | ||
819 | } | ||
820 | #endif | ||