mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-16 08:32:36 -05:00
Renamed CONFIG_HWCODEC and MASNONE to the more appropriate CONFIG_CODEC and SWCODEC, respectively.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7416 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
99a0598c28
commit
d6c054575b
56 changed files with 248 additions and 248 deletions
|
|
@ -23,7 +23,7 @@ settings_menu.c
|
|||
sleeptimer.c
|
||||
sound_menu.c
|
||||
status.c
|
||||
#if !defined(SIMULATOR) || CONFIG_HWCODEC == MASNONE
|
||||
#if !defined(SIMULATOR) || CONFIG_CODEC == SWCODEC
|
||||
talk.c
|
||||
#endif
|
||||
tree.c
|
||||
|
|
@ -49,7 +49,7 @@ recorder/radio.c
|
|||
#ifdef HAVE_RECORDING
|
||||
recorder/recording.c
|
||||
#endif
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
pcmbuf.c
|
||||
playback.c
|
||||
metadata.c
|
||||
|
|
|
|||
|
|
@ -48,12 +48,12 @@
|
|||
#include "system.h"
|
||||
#include "sound.h"
|
||||
#include "database.h"
|
||||
#if (CONFIG_HWCODEC == MASNONE)
|
||||
#if (CONFIG_CODEC == SWCODEC)
|
||||
#include "pcm_playback.h"
|
||||
#endif
|
||||
|
||||
#ifdef SIMULATOR
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
unsigned char codecbuf[CODEC_SIZE];
|
||||
#endif
|
||||
void *sim_codec_load_ram(char* codecptr, int size,
|
||||
|
|
@ -161,10 +161,10 @@ struct codec_api ci = {
|
|||
mp3_play_pause,
|
||||
mp3_play_stop,
|
||||
mp3_is_playing,
|
||||
#if CONFIG_HWCODEC != MASNONE
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
bitswap,
|
||||
#endif
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
pcm_play_data,
|
||||
pcm_play_stop,
|
||||
pcm_set_frequency,
|
||||
|
|
@ -188,24 +188,24 @@ struct codec_api ci = {
|
|||
audio_current_track,
|
||||
audio_flush_and_reload_tracks,
|
||||
audio_get_file_pos,
|
||||
#if !defined(SIMULATOR) && (CONFIG_HWCODEC != MASNONE)
|
||||
#if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
|
||||
mpeg_get_last_header,
|
||||
#endif
|
||||
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
|
||||
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
||||
sound_set_pitch,
|
||||
#endif
|
||||
|
||||
#if !defined(SIMULATOR) && (CONFIG_HWCODEC != MASNONE)
|
||||
#if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
|
||||
/* MAS communication */
|
||||
mas_readmem,
|
||||
mas_writemem,
|
||||
mas_readreg,
|
||||
mas_writereg,
|
||||
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
|
||||
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
||||
mas_codec_writereg,
|
||||
mas_codec_readreg,
|
||||
#endif
|
||||
#endif /* !simulator and HWCODEC != MASNONE */
|
||||
#endif /* !simulator and HWCODEC != SWCODEC */
|
||||
|
||||
/* tag database */
|
||||
&tagdbheader,
|
||||
|
|
@ -232,7 +232,7 @@ struct codec_api ci = {
|
|||
find_next_frame,
|
||||
battery_level,
|
||||
battery_level_safe,
|
||||
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
|
||||
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
||||
peak_meter_scale_value,
|
||||
peak_meter_set_use_dbfs,
|
||||
peak_meter_get_use_dbfs,
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
#include "mpeg.h"
|
||||
#include "audio.h"
|
||||
#include "mp3_playback.h"
|
||||
#if (HWCODEC == MASNONE)
|
||||
#if (HWCODEC == SWCODEC)
|
||||
#include "pcm_playback.h"
|
||||
#endif
|
||||
#include "settings.h"
|
||||
|
|
@ -234,10 +234,10 @@ struct codec_api {
|
|||
void (*mp3_play_pause)(bool play);
|
||||
void (*mp3_play_stop)(void);
|
||||
bool (*mp3_is_playing)(void);
|
||||
#if CONFIG_HWCODEC != MASNONE
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
void (*bitswap)(unsigned char *data, int length);
|
||||
#endif
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
void (*pcm_play_data)(void (*get_more)(unsigned char** start, long*size));
|
||||
void (*pcm_play_stop)(void);
|
||||
void (*pcm_set_frequency)(unsigned int frequency);
|
||||
|
|
@ -261,20 +261,20 @@ struct codec_api {
|
|||
struct mp3entry* (*audio_current_track)(void);
|
||||
void (*audio_flush_and_reload_tracks)(void);
|
||||
int (*audio_get_file_pos)(void);
|
||||
#if !defined(SIMULATOR) && (CONFIG_HWCODEC != MASNONE)
|
||||
#if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
|
||||
unsigned long (*mpeg_get_last_header)(void);
|
||||
#endif
|
||||
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
|
||||
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
||||
void (*sound_set_pitch)(int pitch);
|
||||
#endif
|
||||
|
||||
/* MAS communication */
|
||||
#if !defined(SIMULATOR) && (CONFIG_HWCODEC != MASNONE)
|
||||
#if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
|
||||
int (*mas_readmem)(int bank, int addr, unsigned long* dest, int len);
|
||||
int (*mas_writemem)(int bank, int addr, const unsigned long* src, int len);
|
||||
int (*mas_readreg)(int reg);
|
||||
int (*mas_writereg)(int reg, unsigned int val);
|
||||
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
|
||||
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
||||
int (*mas_codec_writereg)(int reg, unsigned int val);
|
||||
int (*mas_codec_readreg)(int reg);
|
||||
#endif
|
||||
|
|
@ -311,7 +311,7 @@ struct codec_api {
|
|||
long max_offset, unsigned long last_header);
|
||||
int (*battery_level)(void);
|
||||
bool (*battery_level_safe)(void);
|
||||
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
|
||||
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
||||
unsigned short (*peak_meter_scale_value)(unsigned short val,
|
||||
int meterwidth);
|
||||
void (*peak_meter_set_use_dbfs)(bool use);
|
||||
|
|
@ -332,7 +332,7 @@ struct codec_api {
|
|||
};
|
||||
|
||||
/* defined by the codec loader (codec.c) */
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
int codec_load_ram(char* codecptr, int size, void* ptr2, int bufwrap,
|
||||
struct codec_api *api);
|
||||
int codec_load_file(const char* codec, struct codec_api *api);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#if CONFIG_HWCODEC == MASNONE /* software codec platforms */
|
||||
#if CONFIG_CODEC == SWCODEC /* software codec platforms */
|
||||
codeclib.c
|
||||
xxx2wav.c
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
/* Various "helper functions" common to all the xxx2wav decoder plugins */
|
||||
|
||||
#if (CONFIG_HWCODEC == MASNONE)
|
||||
#if (CONFIG_CODEC == SWCODEC)
|
||||
/* software codec platforms, not for simulator */
|
||||
|
||||
#include "codecs.h"
|
||||
|
|
@ -138,4 +138,4 @@ void qsort(void *base, size_t nmemb, size_t size,
|
|||
local_rb->qsort(base,nmemb,size,compar);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_HWCODEC == MASNONE */
|
||||
#endif /* CONFIG_CODEC == SWCODEC */
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
#include "database.h"
|
||||
#include "autoconf.h"
|
||||
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
#include "playback.h"
|
||||
#else
|
||||
#include "mpeg.h"
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
#if defined(IRIVER_H100_SERIES) && !defined(SIMULATOR)
|
||||
extern bool pcm_rec_screen(void);
|
||||
#endif
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
#include "pcmbuf.h"
|
||||
#include "pcm_playback.h"
|
||||
#endif
|
||||
|
|
@ -154,7 +154,7 @@ bool dbg_os(void)
|
|||
#endif
|
||||
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
#if CONFIG_HWCODEC != MASNONE
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
bool dbg_audio_thread(void)
|
||||
{
|
||||
char buf[32];
|
||||
|
|
|
|||
|
|
@ -40,14 +40,14 @@
|
|||
#define MAX_PLUGIN_LENGTH 32
|
||||
|
||||
/* max filetypes (plugins & icons stored here) */
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
#define MAX_FILETYPES 64
|
||||
#else
|
||||
#define MAX_FILETYPES 32
|
||||
#endif
|
||||
|
||||
/* max exttypes (extensions stored here) */
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
/* Software codecs require more file extensions */
|
||||
#define MAX_EXTTYPES 64
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
#include "misc.h"
|
||||
#include "database.h"
|
||||
|
||||
#if (CONFIG_HWCODEC == MASNONE)
|
||||
#if (CONFIG_CODEC == SWCODEC)
|
||||
#include "pcmbuf.h"
|
||||
#else
|
||||
#define pcmbuf_init()
|
||||
|
|
@ -129,7 +129,7 @@ void init(void)
|
|||
global_settings.mdb_enable,
|
||||
global_settings.superbass);
|
||||
button_clear_queue(); /* Empty the keyboard buffer */
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
talk_init();
|
||||
#endif
|
||||
}
|
||||
|
|
@ -264,7 +264,7 @@ void init(void)
|
|||
|
||||
/* On software codec platforms we have to init audio before
|
||||
calling audio_set_buffer_margin(). */
|
||||
#if (CONFIG_HWCODEC == MASNONE)
|
||||
#if (CONFIG_CODEC == SWCODEC)
|
||||
audio_init();
|
||||
#endif
|
||||
settings_calc_config_sector();
|
||||
|
|
@ -291,7 +291,7 @@ void init(void)
|
|||
global_settings.mdb_shape,
|
||||
global_settings.mdb_enable,
|
||||
global_settings.superbass);
|
||||
#if (CONFIG_HWCODEC == MASNONE)
|
||||
#if (CONFIG_CODEC == SWCODEC)
|
||||
sound_settings_apply();
|
||||
#else
|
||||
audio_init();
|
||||
|
|
|
|||
|
|
@ -1417,7 +1417,7 @@ int playlist_resume(void)
|
|||
};
|
||||
|
||||
/* use mp3 buffer for maximum load speed */
|
||||
#if CONFIG_HWCODEC != MASNONE
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
talk_buffer_steal(); /* we use the mp3 buffer, need to tell */
|
||||
buflen = (audiobufend - audiobuf);
|
||||
buffer = audiobuf;
|
||||
|
|
@ -1836,7 +1836,7 @@ int playlist_start(int start_index, int offset)
|
|||
struct playlist_info* playlist = ¤t_playlist;
|
||||
|
||||
playlist->index = start_index;
|
||||
#if CONFIG_HWCODEC != MASNONE
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
talk_buffer_steal(); /* will use the mp3 buffer */
|
||||
#endif
|
||||
audio_play(offset);
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
#include "timer.h"
|
||||
#include "sound.h"
|
||||
#include "database.h"
|
||||
#if (CONFIG_HWCODEC == MASNONE)
|
||||
#if (CONFIG_CODEC == SWCODEC)
|
||||
#include "pcm_playback.h"
|
||||
#endif
|
||||
|
||||
|
|
@ -249,10 +249,10 @@ static const struct plugin_api rockbox_api = {
|
|||
mp3_play_pause,
|
||||
mp3_play_stop,
|
||||
mp3_is_playing,
|
||||
#if CONFIG_HWCODEC != MASNONE
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
bitswap,
|
||||
#endif
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
pcm_play_data,
|
||||
pcm_play_stop,
|
||||
pcm_set_frequency,
|
||||
|
|
@ -276,24 +276,24 @@ static const struct plugin_api rockbox_api = {
|
|||
audio_current_track,
|
||||
audio_flush_and_reload_tracks,
|
||||
audio_get_file_pos,
|
||||
#if !defined(SIMULATOR) && (CONFIG_HWCODEC != MASNONE)
|
||||
#if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
|
||||
mpeg_get_last_header,
|
||||
#endif
|
||||
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
|
||||
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
||||
sound_set_pitch,
|
||||
#endif
|
||||
|
||||
#if !defined(SIMULATOR) && (CONFIG_HWCODEC != MASNONE)
|
||||
#if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
|
||||
/* MAS communication */
|
||||
mas_readmem,
|
||||
mas_writemem,
|
||||
mas_readreg,
|
||||
mas_writereg,
|
||||
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
|
||||
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
||||
mas_codec_writereg,
|
||||
mas_codec_readreg,
|
||||
#endif
|
||||
#endif /* !simulator and HWCODEC != MASNONE */
|
||||
#endif /* !SIMULATOR && CONFIG_CODEC != SWCODEC */
|
||||
|
||||
/* tag database */
|
||||
&tagdbheader,
|
||||
|
|
@ -328,7 +328,7 @@ static const struct plugin_api rockbox_api = {
|
|||
find_next_frame,
|
||||
battery_level,
|
||||
battery_level_safe,
|
||||
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
|
||||
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
||||
peak_meter_scale_value,
|
||||
peak_meter_set_use_dbfs,
|
||||
peak_meter_get_use_dbfs,
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
#include "mpeg.h"
|
||||
#include "audio.h"
|
||||
#include "mp3_playback.h"
|
||||
#if (HWCODEC == MASNONE)
|
||||
#if (HWCODEC == SWCODEC)
|
||||
#include "pcm_playback.h"
|
||||
#endif
|
||||
#include "settings.h"
|
||||
|
|
@ -325,10 +325,10 @@ struct plugin_api {
|
|||
void (*mp3_play_pause)(bool play);
|
||||
void (*mp3_play_stop)(void);
|
||||
bool (*mp3_is_playing)(void);
|
||||
#if CONFIG_HWCODEC != MASNONE
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
void (*bitswap)(unsigned char *data, int length);
|
||||
#endif
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
void (*pcm_play_data)(void (*get_more)(unsigned char** start, long*size));
|
||||
void (*pcm_play_stop)(void);
|
||||
void (*pcm_set_frequency)(unsigned int frequency);
|
||||
|
|
@ -352,20 +352,20 @@ struct plugin_api {
|
|||
struct mp3entry* (*audio_current_track)(void);
|
||||
void (*audio_flush_and_reload_tracks)(void);
|
||||
int (*audio_get_file_pos)(void);
|
||||
#if !defined(SIMULATOR) && (CONFIG_HWCODEC != MASNONE)
|
||||
#if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
|
||||
unsigned long (*mpeg_get_last_header)(void);
|
||||
#endif
|
||||
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
|
||||
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
||||
void (*sound_set_pitch)(int pitch);
|
||||
#endif
|
||||
|
||||
/* MAS communication */
|
||||
#if !defined(SIMULATOR) && (CONFIG_HWCODEC != MASNONE)
|
||||
#if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
|
||||
int (*mas_readmem)(int bank, int addr, unsigned long* dest, int len);
|
||||
int (*mas_writemem)(int bank, int addr, const unsigned long* src, int len);
|
||||
int (*mas_readreg)(int reg);
|
||||
int (*mas_writereg)(int reg, unsigned int val);
|
||||
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
|
||||
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
||||
int (*mas_codec_writereg)(int reg, unsigned int val);
|
||||
int (*mas_codec_readreg)(int reg);
|
||||
#endif
|
||||
|
|
@ -410,7 +410,7 @@ struct plugin_api {
|
|||
long max_offset, unsigned long last_header);
|
||||
int (*battery_level)(void);
|
||||
bool (*battery_level_safe)(void);
|
||||
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
|
||||
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
||||
unsigned short (*peak_meter_scale_value)(unsigned short val,
|
||||
int meterwidth);
|
||||
void (*peak_meter_set_use_dbfs)(bool use);
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ nim.c
|
|||
alpine_cdc.c
|
||||
#endif
|
||||
|
||||
#if CONFIG_HWCODEC == MASNONE /* software codec platforms */
|
||||
#if CONFIG_CODEC == SWCODEC /* software codec platforms */
|
||||
iriverify.c
|
||||
wav2wv.c
|
||||
midi2wav.c
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
#ifndef SIMULATOR /* don't want this code in the simulator */
|
||||
#if CONFIG_HWCODEC != MASNONE /* only for MAS-targets */
|
||||
#if CONFIG_CODEC != SWCODEC /* only for MAS-targets */
|
||||
|
||||
/* The different drawing modes */
|
||||
#define DRAW_MODE_FILLED 0
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#include "plugin.h"
|
||||
|
||||
#ifdef HAVE_LCD_BITMAP /* and also not for the Player */
|
||||
#if CONFIG_HWCODEC != MASNONE /* only for MAS-targets */
|
||||
#if CONFIG_CODEC != SWCODEC /* only for MAS-targets */
|
||||
|
||||
/* The different drawing modes */
|
||||
#define DRAW_MODE_FILLED 0
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ rcvar_t pcm_exports[] =
|
|||
RCV_END
|
||||
};
|
||||
|
||||
/*#if CONFIG_HWCODEC == MASNONE && !defined(SIMULATOR)
|
||||
/*#if CONFIG_CODEC == SWCODEC && !defined(SIMULATOR)
|
||||
* disabled cause it crashes with current audio implementation.. no sound.
|
||||
*/
|
||||
#if 0
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ static void update_icons(void)
|
|||
LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT,
|
||||
BMPWIDTH, BMPHEIGHT);
|
||||
|
||||
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
|
||||
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
||||
/* The scale icon */
|
||||
rb->lcd_mono_bitmap(SCALE_BMP[rb->peak_meter_get_use_dbfs() ? 1 : 0],
|
||||
2 *LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT,
|
||||
|
|
@ -909,7 +909,7 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split,
|
|||
{
|
||||
/* read volume info */
|
||||
unsigned short volume;
|
||||
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
|
||||
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
||||
volume = rb->mas_codec_readreg(0x0c);
|
||||
volume += rb->mas_codec_readreg(0x0d);
|
||||
volume = volume / 2;
|
||||
|
|
@ -1074,7 +1074,7 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split,
|
|||
lastx = time_to_xpos(mp3->elapsed);
|
||||
break;
|
||||
|
||||
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
|
||||
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
||||
#ifdef SPLITEDIT_SPEED100
|
||||
case SPLITEDIT_SPEED150:
|
||||
rb->sound_set_pitch(1500);
|
||||
|
|
@ -1133,7 +1133,7 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split,
|
|||
break;
|
||||
|
||||
case SPLITEDIT_SCALE:
|
||||
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
|
||||
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
||||
rb->peak_meter_set_use_dbfs(!rb->peak_meter_get_use_dbfs());
|
||||
#endif
|
||||
splitedit_invalidate_osci();
|
||||
|
|
@ -1202,7 +1202,7 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split,
|
|||
}
|
||||
}
|
||||
}
|
||||
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
|
||||
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
||||
#ifdef SPLITEDIT_SPEED100
|
||||
rb->sound_set_pitch(1000); /* make sure to reset pitch */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
**************************************************************************/
|
||||
#include "plugin.h"
|
||||
|
||||
#if defined(HAVE_LCD_BITMAP) && (CONFIG_HWCODEC != MASNONE)
|
||||
#if defined(HAVE_LCD_BITMAP) && (CONFIG_CODEC != SWCODEC)
|
||||
|
||||
/* variable button definitions */
|
||||
#if CONFIG_KEYPAD == RECORDER_PAD
|
||||
|
|
|
|||
|
|
@ -33,11 +33,11 @@
|
|||
#include "lang.h"
|
||||
#include "peakmeter.h"
|
||||
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
#include "pcm_playback.h"
|
||||
#endif
|
||||
|
||||
#if !defined(SIMULATOR) && CONFIG_HWCODEC != MASNONE
|
||||
#if !defined(SIMULATOR) && CONFIG_CODEC != SWCODEC
|
||||
/* Data source */
|
||||
static int pm_src_left = MAS_REG_DQPEAK_L;
|
||||
static int pm_src_right = MAS_REG_DQPEAK_R;
|
||||
|
|
@ -490,7 +490,7 @@ void peak_meter_playback(bool playback)
|
|||
{
|
||||
#ifdef SIMULATOR
|
||||
(void)playback;
|
||||
#elif CONFIG_HWCODEC == MASNONE
|
||||
#elif CONFIG_CODEC == SWCODEC
|
||||
/* FIX: not for the sw-based ones yes */
|
||||
(void)playback;
|
||||
#else
|
||||
|
|
@ -530,7 +530,7 @@ void peak_meter_peek(void)
|
|||
#ifdef SIMULATOR
|
||||
pm_cur_left = left = 8000;
|
||||
pm_cur_right = right = 9000;
|
||||
#elif CONFIG_HWCODEC == MASNONE
|
||||
#elif CONFIG_CODEC == SWCODEC
|
||||
pcm_calculate_peaks(&pm_cur_left, &pm_cur_right);
|
||||
left = pm_cur_left;
|
||||
right = pm_cur_right;
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
|
||||
#ifdef CONFIG_TUNER
|
||||
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
#include "uda1380.h"
|
||||
#include "pcm_record.h"
|
||||
#endif
|
||||
|
|
@ -213,14 +213,14 @@ bool radio_screen(void)
|
|||
radio_load_presets();
|
||||
|
||||
#ifndef SIMULATOR
|
||||
#if CONFIG_HWCODEC != MASNONE
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
if(rec_create_directory() > 0)
|
||||
have_recorded = true;
|
||||
#endif
|
||||
|
||||
audio_stop();
|
||||
|
||||
#if CONFIG_HWCODEC != MASNONE
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
mpeg_init_recording();
|
||||
|
||||
sound_settings_apply();
|
||||
|
|
@ -497,7 +497,7 @@ bool radio_screen(void)
|
|||
}
|
||||
|
||||
#ifndef SIMULATOR
|
||||
#if CONFIG_HWCODEC != MASNONE
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
seconds = mpeg_recorded_time() / HZ;
|
||||
#endif
|
||||
#endif
|
||||
|
|
@ -580,7 +580,7 @@ bool radio_screen(void)
|
|||
}
|
||||
}
|
||||
|
||||
#if CONFIG_HWCODEC != MASNONE
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
audio_init_playback();
|
||||
#endif
|
||||
|
||||
|
|
@ -588,7 +588,7 @@ bool radio_screen(void)
|
|||
|
||||
if(keep_playing)
|
||||
{
|
||||
#if CONFIG_HWCODEC != MASNONE
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
/* Enable the Left and right A/D Converter */
|
||||
mpeg_set_recording_gain(sound_default(SOUND_LEFT_GAIN),
|
||||
sound_default(SOUND_RIGHT_GAIN), false);
|
||||
|
|
@ -599,7 +599,7 @@ bool radio_screen(void)
|
|||
else
|
||||
{
|
||||
radio_stop();
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
pcmrec_set_mux(0); /* Line In */
|
||||
#endif
|
||||
}
|
||||
|
|
@ -880,7 +880,7 @@ bool handle_radio_presets(void)
|
|||
}
|
||||
|
||||
#ifndef SIMULATOR
|
||||
#if CONFIG_HWCODEC != MASNONE
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
static bool fm_recording_settings(void)
|
||||
{
|
||||
bool ret;
|
||||
|
|
@ -959,7 +959,7 @@ bool radio_menu(void)
|
|||
#endif
|
||||
{ monomode_menu_string , toggle_mono_mode },
|
||||
{ ID2P(LANG_SOUND_SETTINGS) , sound_menu },
|
||||
#if !defined(SIMULATOR) && (CONFIG_HWCODEC != MASNONE)
|
||||
#if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
|
||||
{ ID2P(LANG_RECORDING_SETTINGS) , fm_recording_settings},
|
||||
#endif
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1307,7 +1307,7 @@ int draw_id3_item(int line, int top, int header, const char* body)
|
|||
return line + 2;
|
||||
}
|
||||
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
#define ID3_ITEMS 13
|
||||
#else
|
||||
#define ID3_ITEMS 11
|
||||
|
|
@ -1401,7 +1401,7 @@ bool browse_id3(void)
|
|||
snprintf(buf, sizeof(buf), "%d Hz", id3->frequency);
|
||||
line = draw_id3_item(line, top, LANG_ID3_FRECUENCY, buf);
|
||||
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
line = draw_id3_item(line, top, LANG_ID3_TRACK_GAIN,
|
||||
id3->track_gain_string);
|
||||
|
||||
|
|
|
|||
|
|
@ -66,14 +66,14 @@
|
|||
#include "version.h"
|
||||
#include "rtc.h"
|
||||
#include "sound.h"
|
||||
#if CONFIG_HWCODEC == MAS3507D
|
||||
#if CONFIG_CODEC == MAS3507D
|
||||
void dac_line_in(bool enable);
|
||||
#endif
|
||||
struct user_settings global_settings;
|
||||
#ifdef HAVE_RECORDING
|
||||
const char rec_base_directory[] = REC_BASE_DIR;
|
||||
#endif
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
#include "pcmbuf.h"
|
||||
#include "pcm_playback.h"
|
||||
#endif
|
||||
|
|
@ -183,14 +183,14 @@ static const struct bit_entry rtc_bits[] =
|
|||
/* sound */
|
||||
{7, S_O(volume), 70, "volume", NULL }, /* 0...100 */
|
||||
{8 | SIGNED, S_O(balance), 0, "balance", NULL }, /* -100...100 */
|
||||
#if CONFIG_HWCODEC != MASNONE /* any MAS */
|
||||
#if CONFIG_CODEC != SWCODEC /* any MAS */
|
||||
{5 | SIGNED, S_O(bass), 0, "bass", NULL }, /* -15..+15 / -12..+12 */
|
||||
{5 | SIGNED, S_O(treble), 0, "treble", NULL }, /* -15..+15 / -12..+12 */
|
||||
#elif defined HAVE_UDA1380
|
||||
{5, S_O(bass), 0, "bass", NULL }, /* 0..+24 */
|
||||
{3, S_O(treble), 0, "treble", NULL }, /* 0..+6 */
|
||||
#endif
|
||||
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
|
||||
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
||||
{5, S_O(loudness), 0, "loudness", NULL }, /* 0...17 */
|
||||
{3, S_O(avc), 0, "auto volume", "off,20ms,2,4,8" },
|
||||
{1, S_O(superbass), false, "superbass", off_on },
|
||||
|
|
@ -312,7 +312,7 @@ static const struct bit_entry hd_bits[] =
|
|||
{4, S_O(ff_rewind_min_step), FF_REWIND_1000,
|
||||
"scan min step", "1,2,3,4,5,6,8,10,15,20,25,30,45,60" },
|
||||
{4, S_O(ff_rewind_accel), 3, "scan accel", NULL },
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
{3, S_O(buffer_margin), 0, "antiskip",
|
||||
"5s,15s,30s,1min,2min,3min,5min,10min" },
|
||||
#else
|
||||
|
|
@ -356,7 +356,7 @@ static const struct bit_entry hd_bits[] =
|
|||
{7, S_O(peak_meter_min), 60, "peak meter min", NULL }, /* 0...100 */
|
||||
{7, S_O(peak_meter_max), 0, "peak meter max", NULL }, /* 0...100 */
|
||||
#endif
|
||||
#if CONFIG_HWCODEC == MAS3587F
|
||||
#if CONFIG_CODEC == MAS3587F
|
||||
/* recording */
|
||||
{1, S_O(rec_editable), false, "editable recordings", off_on },
|
||||
{4, S_O(rec_timesplit), 0, "rec timesplit", /* 0...15 */
|
||||
|
|
@ -376,14 +376,14 @@ static const struct bit_entry hd_bits[] =
|
|||
{1, S_O(rec_directory), 0, /* rec_base_directory */
|
||||
"rec directory", REC_BASE_DIR ",current" },
|
||||
#endif
|
||||
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
|
||||
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
||||
{7, S_O(mdb_strength), 0, "mdb strength", NULL},
|
||||
{7, S_O(mdb_harmonics), 0, "mdb harmonics", NULL},
|
||||
{9, S_O(mdb_center), 0, "mdb center", NULL},
|
||||
{9, S_O(mdb_shape), 0, "mdb shape", NULL},
|
||||
{1, S_O(mdb_enable), 0, "mdb enable", off_on},
|
||||
#endif
|
||||
#if CONFIG_HWCODEC == MAS3507D
|
||||
#if CONFIG_CODEC == MAS3507D
|
||||
{1, S_O(line_in), false, "line in", off_on },
|
||||
#endif
|
||||
/* voice */
|
||||
|
|
@ -407,7 +407,7 @@ static const struct bit_entry hd_bits[] =
|
|||
{4, S_O(rec_trigger_mode ), 1, "trigger mode", "off,no rearm,rearm"},
|
||||
#endif
|
||||
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
{3, S_O(crossfade_duration), 0, "crossfade duration", "1s,2s,4s,6s,8s,10s,12s,14s"},
|
||||
#endif
|
||||
|
||||
|
|
@ -425,7 +425,7 @@ static const struct bit_entry hd_bits[] =
|
|||
{1, S_O(next_folder), false, "move to next folder", off_on },
|
||||
{1, S_O(runtimedb), false, "gather runtime data", off_on },
|
||||
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
{2, S_O(crossfade), 0, "crossfade type", "off,crossfade,mix"},
|
||||
{1, S_O(replaygain), false, "replaygain", off_on },
|
||||
{1, S_O(replaygain_track), false, "replaygain type", "track,album" },
|
||||
|
|
@ -776,7 +776,7 @@ void sound_settings_apply(void)
|
|||
sound_set(SOUND_VOLUME, global_settings.volume);
|
||||
sound_set(SOUND_CHANNELS, global_settings.channel_config);
|
||||
sound_set(SOUND_STEREO_WIDTH, global_settings.stereo_width);
|
||||
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
|
||||
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
||||
sound_set(SOUND_LOUDNESS, global_settings.loudness);
|
||||
sound_set(SOUND_AVC, global_settings.avc);
|
||||
sound_set(SOUND_MDB_STRENGTH, global_settings.mdb_strength);
|
||||
|
|
@ -811,7 +811,7 @@ void settings_apply(void)
|
|||
backlight_set_fade_out(global_settings.backlight_fade_out);
|
||||
#endif
|
||||
ata_spindown(global_settings.disk_spindown);
|
||||
#if CONFIG_HWCODEC == MAS3507D
|
||||
#if CONFIG_CODEC == MAS3507D
|
||||
dac_line_in(global_settings.line_in);
|
||||
#endif
|
||||
#ifdef HAVE_ATA_POWER_OFF
|
||||
|
|
@ -872,7 +872,7 @@ void settings_apply(void)
|
|||
talk_init(); /* use voice of same language */
|
||||
}
|
||||
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
audio_set_crossfade(global_settings.crossfade);
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ struct user_settings
|
|||
bool mdb_enable; /* true/false */
|
||||
bool superbass; /* true/false */
|
||||
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
int crossfade;
|
||||
int crossfade_duration;
|
||||
#endif
|
||||
|
|
@ -330,7 +330,7 @@ struct user_settings
|
|||
bool next_folder; /* move to next folder */
|
||||
bool runtimedb; /* runtime database active? */
|
||||
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
bool replaygain; /* enable replaygain */
|
||||
bool replaygain_track; /* true for track gain, false for album gain */
|
||||
bool replaygain_noclip; /* scale to prevent clips */
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
#include "peakmeter.h"
|
||||
#endif
|
||||
#include "lang.h"
|
||||
#if CONFIG_HWCODEC == MAS3507D
|
||||
#if CONFIG_CODEC == MAS3507D
|
||||
void dac_line_in(bool enable);
|
||||
#endif
|
||||
#ifdef HAVE_ALARM_MOD
|
||||
|
|
@ -65,7 +65,7 @@ void dac_line_in(bool enable);
|
|||
#include "lcd-remote.h"
|
||||
#endif
|
||||
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
#include "pcmbuf.h"
|
||||
#include "pcm_playback.h"
|
||||
#include "dsp.h"
|
||||
|
|
@ -879,7 +879,7 @@ static bool poweroff(void)
|
|||
#endif /* HAVE_ATA_POWEROFF */
|
||||
#endif /* !HAVE_MMC */
|
||||
|
||||
#if CONFIG_HWCODEC == MAS3507D
|
||||
#if CONFIG_CODEC == MAS3507D
|
||||
static bool line_in(void)
|
||||
{
|
||||
bool rc = set_bool(str(LANG_LINE_IN), &global_settings.line_in);
|
||||
|
|
@ -902,7 +902,7 @@ static bool max_files_in_playlist(void)
|
|||
NULL, 1000, 1000, 20000, NULL );
|
||||
}
|
||||
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
static bool buffer_margin(void)
|
||||
{
|
||||
int ret;
|
||||
|
|
@ -1111,7 +1111,7 @@ static bool id3_order(void)
|
|||
mpeg_id3_options);
|
||||
}
|
||||
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
static bool crossfade(void)
|
||||
{
|
||||
static const struct opt_items names[] = {
|
||||
|
|
@ -1172,7 +1172,7 @@ static bool runtimedb(void)
|
|||
return rc;
|
||||
}
|
||||
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
static bool replaygain(void)
|
||||
{
|
||||
bool result = set_bool(str(LANG_REPLAYGAIN_ENABLE),
|
||||
|
|
@ -1270,7 +1270,7 @@ static bool playback_settings_menu(void)
|
|||
{ ID2P(LANG_WIND_MENU), ff_rewind_settings_menu },
|
||||
{ ID2P(LANG_MP3BUFFER_MARGIN), buffer_margin },
|
||||
{ ID2P(LANG_FADE_ON_STOP), set_fade_on_stop },
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
{ ID2P(LANG_CROSSFADE), crossfade },
|
||||
{ ID2P(LANG_CROSSFADE_DURATION), crossfade_duration },
|
||||
{ ID2P(LANG_REPLAYGAIN), replaygain_settings_menu },
|
||||
|
|
@ -1654,7 +1654,7 @@ static bool system_settings_menu(void)
|
|||
{ ID2P(LANG_ALARM_MOD_ALARM_MENU), alarm_screen },
|
||||
#endif
|
||||
{ ID2P(LANG_LIMITS_MENU), limits_settings_menu },
|
||||
#if CONFIG_HWCODEC == MAS3507D
|
||||
#if CONFIG_CODEC == MAS3507D
|
||||
{ ID2P(LANG_LINE_IN), line_in },
|
||||
#endif
|
||||
#ifdef HAVE_CHARGING
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
#include "talk.h"
|
||||
#include "misc.h"
|
||||
#include "sound.h"
|
||||
#if CONFIG_HWCODEC == MAS3587F
|
||||
#if CONFIG_CODEC == MAS3587F
|
||||
#include "peakmeter.h"
|
||||
#include "mas.h"
|
||||
#endif
|
||||
|
|
@ -171,7 +171,7 @@ static bool treble(void)
|
|||
return set_sound(str(LANG_TREBLE), &global_settings.treble, SOUND_TREBLE);
|
||||
}
|
||||
|
||||
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
|
||||
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
||||
static bool loudness(void)
|
||||
{
|
||||
return set_sound(str(LANG_LOUDNESS), &global_settings.loudness,
|
||||
|
|
@ -421,7 +421,7 @@ bool sound_menu(void)
|
|||
{ ID2P(LANG_BALANCE), balance },
|
||||
{ ID2P(LANG_CHANNEL_MENU), chanconf },
|
||||
{ ID2P(LANG_STEREO_WIDTH), stereo_width },
|
||||
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
|
||||
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
||||
{ ID2P(LANG_LOUDNESS), loudness },
|
||||
{ ID2P(LANG_AUTOVOL), avc },
|
||||
{ ID2P(LANG_SUPERBASS), superbass },
|
||||
|
|
@ -454,7 +454,7 @@ enum trigger_menu_option
|
|||
TRIG_OPTION_COUNT,
|
||||
};
|
||||
|
||||
#if !defined(SIMULATOR) && CONFIG_HWCODEC == MAS3587F
|
||||
#if !defined(SIMULATOR) && CONFIG_CODEC == MAS3587F
|
||||
static char* create_thres_str(int threshold)
|
||||
{
|
||||
static char retval[6];
|
||||
|
|
@ -846,7 +846,7 @@ bool recording_menu(bool no_source)
|
|||
items[i++].function = recdirectory;
|
||||
items[i].desc = ID2P(LANG_RECORD_STARTUP);
|
||||
items[i++].function = reconstartup;
|
||||
#if !defined(SIMULATOR) && CONFIG_HWCODEC == MAS3587F
|
||||
#if !defined(SIMULATOR) && CONFIG_CODEC == MAS3587F
|
||||
items[i].desc = str(LANG_RECORD_TRIGGER);
|
||||
items[i++].function = rectrigger;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ int current_playmode(void)
|
|||
else
|
||||
return STATUS_PLAY;
|
||||
}
|
||||
#if CONFIG_HWCODEC == MAS3587F
|
||||
#if CONFIG_CODEC == MAS3587F
|
||||
else
|
||||
{
|
||||
if(audio_stat & AUDIO_STATUS_RECORD)
|
||||
|
|
|
|||
24
apps/talk.c
24
apps/talk.c
|
|
@ -34,7 +34,7 @@
|
|||
#include "id3.h"
|
||||
#include "logf.h"
|
||||
#include "bitswap.h"
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
#include "playback.h"
|
||||
#endif
|
||||
|
||||
|
|
@ -148,7 +148,7 @@ static void load_voicefile(void)
|
|||
int load_size;
|
||||
int got_size;
|
||||
int file_size;
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
int length, i;
|
||||
unsigned char *buf, temp;
|
||||
#endif
|
||||
|
|
@ -205,7 +205,7 @@ static void load_voicefile(void)
|
|||
#endif
|
||||
|
||||
/* Do a bitswap as necessary. */
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
logf("Bitswapping voice file.");
|
||||
cpu_boost(true);
|
||||
buf = (unsigned char *)(&p_voicefile->index) +
|
||||
|
|
@ -261,7 +261,7 @@ static void mp3_callback(unsigned char** start, int* size)
|
|||
|
||||
if (queue[queue_read].len > 0) /* current clip not finished? */
|
||||
{ /* feed the next 64K-1 chunk */
|
||||
#if CONFIG_HWCODEC != MASNONE
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
sent = MIN(queue[queue_read].len, 0xFFFF);
|
||||
#else
|
||||
sent = queue[queue_read].len;
|
||||
|
|
@ -279,7 +279,7 @@ re_check:
|
|||
|
||||
if (QUEUE_LEVEL) /* queue is not empty? */
|
||||
{ /* start next clip */
|
||||
#if CONFIG_HWCODEC != MASNONE
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
sent = MIN(queue[queue_read].len, 0xFFFF);
|
||||
#else
|
||||
sent = queue[queue_read].len;
|
||||
|
|
@ -393,7 +393,7 @@ static int queue_clip(unsigned char* buf, long size, bool enqueue)
|
|||
if (queue_level == 0)
|
||||
{ /* queue was empty, we have to do the initial start */
|
||||
p_lastclip = buf;
|
||||
#if CONFIG_HWCODEC != MASNONE
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
sent = MIN(size, 0xFFFF); /* DMA can do no more */
|
||||
#else
|
||||
sent = size;
|
||||
|
|
@ -485,7 +485,7 @@ void talk_init(void)
|
|||
if (has_voicefile)
|
||||
{
|
||||
voicefile_size = filesize(filehandle);
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
voice_init();
|
||||
#endif
|
||||
close(filehandle); /* close again, this was just to detect presence */
|
||||
|
|
@ -519,7 +519,7 @@ int talk_id(long id, bool enqueue)
|
|||
unsigned char* clipbuf;
|
||||
int unit;
|
||||
|
||||
#if CONFIG_HWCODEC != MASNONE
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
if (audio_status()) /* busy, buffer in use */
|
||||
return -1;
|
||||
#endif
|
||||
|
|
@ -586,7 +586,7 @@ int talk_file(const char* filename, bool enqueue)
|
|||
|
||||
if (size)
|
||||
{
|
||||
#if CONFIG_HWCODEC != MASNONE
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
bitswap(p_thumbnail, size);
|
||||
#endif
|
||||
queue_clip(p_thumbnail, size, enqueue);
|
||||
|
|
@ -603,7 +603,7 @@ int talk_number(long n, bool enqueue)
|
|||
int level = 0; /* mille count */
|
||||
long mil = 1000000000; /* highest possible "-illion" */
|
||||
|
||||
#if CONFIG_HWCODEC != MASNONE
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
if (audio_status()) /* busy, buffer in use */
|
||||
return -1;
|
||||
#endif
|
||||
|
|
@ -684,7 +684,7 @@ int talk_value(long n, int unit, bool enqueue)
|
|||
VOICE_HERTZ,
|
||||
};
|
||||
|
||||
#if CONFIG_HWCODEC != MASNONE
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
if (audio_status()) /* busy, buffer in use */
|
||||
return -1;
|
||||
#endif
|
||||
|
|
@ -718,7 +718,7 @@ int talk_spell(const char* spell, bool enqueue)
|
|||
{
|
||||
char c; /* currently processed char */
|
||||
|
||||
#if CONFIG_HWCODEC != MASNONE
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
if (audio_status()) /* busy, buffer in use */
|
||||
return -1;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ const struct filetype filetypes[] = {
|
|||
{ ".mp3", TREE_ATTR_MPA, Icon_Audio, VOICE_EXT_MPA },
|
||||
{ ".mp2", TREE_ATTR_MPA, Icon_Audio, VOICE_EXT_MPA },
|
||||
{ ".mpa", TREE_ATTR_MPA, Icon_Audio, VOICE_EXT_MPA },
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
/* Temporary hack to allow playlist creation */
|
||||
{ ".mp1", TREE_ATTR_MPA, Icon_Audio, VOICE_EXT_MPA },
|
||||
{ ".ogg", TREE_ATTR_MPA, Icon_Audio, VOICE_EXT_MPA },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue