diff options
| author | Jeffrey Goode <jeffg7@gmail.com> | 2009-10-22 00:59:42 +0000 |
|---|---|---|
| committer | Jeffrey Goode <jeffg7@gmail.com> | 2009-10-22 00:59:42 +0000 |
| commit | faa47bf1b77c3155d52514bc1b294f82b72cd5db (patch) | |
| tree | cefdec2f486b0c9f5928587b3bbdb5def9cf36fa /apps/dsp.c | |
| parent | 6afe802a8335a1334babcdb33a15ee61652bb6f3 (diff) | |
| download | rockbox-faa47bf1b77c3155d52514bc1b294f82b72cd5db.zip rockbox-faa47bf1b77c3155d52514bc1b294f82b72cd5db.tar.gz rockbox-faa47bf1b77c3155d52514bc1b294f82b72cd5db.tar.bz2 rockbox-faa47bf1b77c3155d52514bc1b294f82b72cd5db.tar.xz | |
Code cleanup in dsp.c and misc.c, some comments
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23314 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/dsp.c')
| -rw-r--r-- | apps/dsp.c | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -26,16 +26,13 @@ #include "dsp.h" #include "eq.h" #include "kernel.h" -#include "playback.h" #include "system.h" #include "settings.h" #include "replaygain.h" -#include "misc.h" #include "tdspeed.h" #include "buffer.h" #include "fixedpoint.h" #include "fracmul.h" -#include "pcmbuf.h" /* Define LOGF_ENABLE to enable logf output in this file */ /*#define LOGF_ENABLE*/ @@ -1479,6 +1476,20 @@ intptr_t dsp_configure(struct dsp_config *dsp, int setting, intptr_t value) return 1; } +int get_replaygain_mode(bool have_track_gain, bool have_album_gain) +{ + int type; + + bool track = ((global_settings.replaygain_type == REPLAYGAIN_TRACK) + || ((global_settings.replaygain_type == REPLAYGAIN_SHUFFLE) + && global_settings.playlist_shuffle)); + + type = (!track && have_album_gain) ? REPLAYGAIN_ALBUM + : have_track_gain ? REPLAYGAIN_TRACK : -1; + + return type; +} + void dsp_set_replaygain(void) { long gain = 0; |