diff options
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/dsp.c | 17 | ||||
| -rw-r--r-- | apps/dsp.h | 1 | ||||
| -rw-r--r-- | apps/misc.c | 16 | ||||
| -rw-r--r-- | apps/misc.h | 8 | ||||
| -rw-r--r-- | apps/pcmbuf.c | 3 |
5 files changed, 18 insertions, 27 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; @@ -65,6 +65,7 @@ int dsp_input_count(struct dsp_config *dsp, int count); int dsp_output_count(struct dsp_config *dsp, int count); intptr_t dsp_configure(struct dsp_config *dsp, int setting, intptr_t value); +int get_replaygain_mode(bool have_track_gain, bool have_album_gain); void dsp_set_replaygain(void); void dsp_set_crossfeed(bool enable); void dsp_set_crossfeed_direct_gain(int gain); diff --git a/apps/misc.c b/apps/misc.c index 2766264..47ebf58 100644 --- a/apps/misc.c +++ b/apps/misc.c @@ -682,22 +682,6 @@ int show_logo( void ) return 0; } -#if CONFIG_CODEC == SWCODEC -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; -} -#endif - #ifdef BOOTFILE #if !defined(USB_NONE) && !defined(USB_HANDLED_BY_OF) /* diff --git a/apps/misc.h b/apps/misc.h index 3597230..a8ed602 100644 --- a/apps/misc.h +++ b/apps/misc.h @@ -66,14 +66,6 @@ bool list_stop_handler(void); void car_adapter_mode_init(void); extern int show_logo(void); -#if CONFIG_CODEC == SWCODEC -/* Return current ReplayGain mode a file should have (REPLAYGAIN_TRACK or - * REPLAYGAIN_ALBUM) if ReplayGain processing is enabled, or -1 if no - * information present. - */ -int get_replaygain_mode(bool have_track_gain, bool have_album_gain); -#endif - int open_utf8(const char* pathname, int flags); #ifdef BOOTFILE diff --git a/apps/pcmbuf.c b/apps/pcmbuf.c index 319e3e8..5b47836 100644 --- a/apps/pcmbuf.c +++ b/apps/pcmbuf.c @@ -25,6 +25,9 @@ #include <kernel.h> #include "pcmbuf.h" #include "pcm.h" + +/* Define LOGF_ENABLE to enable logf output in this file */ +/*#define LOGF_ENABLE*/ #include "logf.h" #ifndef SIMULATOR #include "cpu.h" |