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
This commit is contained in:
parent
6afe802a83
commit
faa47bf1b7
6 changed files with 21 additions and 27 deletions
17
apps/dsp.c
17
apps/dsp.c
|
@ -26,16 +26,13 @@
|
||||||
#include "dsp.h"
|
#include "dsp.h"
|
||||||
#include "eq.h"
|
#include "eq.h"
|
||||||
#include "kernel.h"
|
#include "kernel.h"
|
||||||
#include "playback.h"
|
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "replaygain.h"
|
#include "replaygain.h"
|
||||||
#include "misc.h"
|
|
||||||
#include "tdspeed.h"
|
#include "tdspeed.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "fixedpoint.h"
|
#include "fixedpoint.h"
|
||||||
#include "fracmul.h"
|
#include "fracmul.h"
|
||||||
#include "pcmbuf.h"
|
|
||||||
|
|
||||||
/* Define LOGF_ENABLE to enable logf output in this file */
|
/* Define LOGF_ENABLE to enable logf output in this file */
|
||||||
/*#define LOGF_ENABLE*/
|
/*#define LOGF_ENABLE*/
|
||||||
|
@ -1479,6 +1476,20 @@ intptr_t dsp_configure(struct dsp_config *dsp, int setting, intptr_t value)
|
||||||
return 1;
|
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)
|
void dsp_set_replaygain(void)
|
||||||
{
|
{
|
||||||
long gain = 0;
|
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);
|
int dsp_output_count(struct dsp_config *dsp, int count);
|
||||||
intptr_t dsp_configure(struct dsp_config *dsp, int setting,
|
intptr_t dsp_configure(struct dsp_config *dsp, int setting,
|
||||||
intptr_t value);
|
intptr_t value);
|
||||||
|
int get_replaygain_mode(bool have_track_gain, bool have_album_gain);
|
||||||
void dsp_set_replaygain(void);
|
void dsp_set_replaygain(void);
|
||||||
void dsp_set_crossfeed(bool enable);
|
void dsp_set_crossfeed(bool enable);
|
||||||
void dsp_set_crossfeed_direct_gain(int gain);
|
void dsp_set_crossfeed_direct_gain(int gain);
|
||||||
|
|
16
apps/misc.c
16
apps/misc.c
|
@ -682,22 +682,6 @@ int show_logo( void )
|
||||||
return 0;
|
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
|
#ifdef BOOTFILE
|
||||||
#if !defined(USB_NONE) && !defined(USB_HANDLED_BY_OF)
|
#if !defined(USB_NONE) && !defined(USB_HANDLED_BY_OF)
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -66,14 +66,6 @@ bool list_stop_handler(void);
|
||||||
void car_adapter_mode_init(void);
|
void car_adapter_mode_init(void);
|
||||||
extern int show_logo(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);
|
int open_utf8(const char* pathname, int flags);
|
||||||
|
|
||||||
#ifdef BOOTFILE
|
#ifdef BOOTFILE
|
||||||
|
|
|
@ -25,6 +25,9 @@
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include "pcmbuf.h"
|
#include "pcmbuf.h"
|
||||||
#include "pcm.h"
|
#include "pcm.h"
|
||||||
|
|
||||||
|
/* Define LOGF_ENABLE to enable logf output in this file */
|
||||||
|
/*#define LOGF_ENABLE*/
|
||||||
#include "logf.h"
|
#include "logf.h"
|
||||||
#ifndef SIMULATOR
|
#ifndef SIMULATOR
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
|
|
|
@ -21,6 +21,9 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
#include "kernel.h"
|
#include "kernel.h"
|
||||||
|
|
||||||
|
/* Define LOGF_ENABLE to enable logf output in this file */
|
||||||
|
/*#define LOGF_ENABLE*/
|
||||||
#include "logf.h"
|
#include "logf.h"
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
|
|
Loading…
Reference in a new issue