summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJeffrey Goode <jeffg7@gmail.com>2009-10-22 00:59:42 +0000
committerJeffrey Goode <jeffg7@gmail.com>2009-10-22 00:59:42 +0000
commitfaa47bf1b77c3155d52514bc1b294f82b72cd5db (patch)
treecefdec2f486b0c9f5928587b3bbdb5def9cf36fa /apps
parent6afe802a8335a1334babcdb33a15ee61652bb6f3 (diff)
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')
-rw-r--r--apps/dsp.c17
-rw-r--r--apps/dsp.h1
-rw-r--r--apps/misc.c16
-rw-r--r--apps/misc.h8
-rw-r--r--apps/pcmbuf.c3
5 files changed, 18 insertions, 27 deletions
diff --git a/apps/dsp.c b/apps/dsp.c
index e0cea6d41b..ada16b0d89 100644
--- a/apps/dsp.c
+++ b/apps/dsp.c
@@ -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;
diff --git a/apps/dsp.h b/apps/dsp.h
index ab42d73b24..f87037d368 100644
--- a/apps/dsp.h
+++ b/apps/dsp.h
@@ -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 2766264de7..47ebf58080 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 35972301cc..a8ed6029a3 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 319e3e8044..5b478362b5 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"