mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Remove exported pcm functions. Codecs should never be allowed to access
the pcm directly. Only through the callbacks in playback.c. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8544 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
9b0822d76a
commit
d2e75bf02d
2 changed files with 8 additions and 25 deletions
|
@ -50,10 +50,6 @@
|
||||||
#include "database.h"
|
#include "database.h"
|
||||||
#include "splash.h"
|
#include "splash.h"
|
||||||
|
|
||||||
#if (CONFIG_CODEC == SWCODEC)
|
|
||||||
#include "pcm_playback.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SIMULATOR
|
#ifdef SIMULATOR
|
||||||
#if CONFIG_CODEC == SWCODEC
|
#if CONFIG_CODEC == SWCODEC
|
||||||
unsigned char codecbuf[CODEC_SIZE];
|
unsigned char codecbuf[CODEC_SIZE];
|
||||||
|
@ -162,13 +158,6 @@ struct codec_api ci = {
|
||||||
mp3_play_pause,
|
mp3_play_pause,
|
||||||
mp3_play_stop,
|
mp3_play_stop,
|
||||||
mp3_is_playing,
|
mp3_is_playing,
|
||||||
#if CONFIG_CODEC == SWCODEC
|
|
||||||
pcm_play_data,
|
|
||||||
pcm_play_stop,
|
|
||||||
pcm_set_frequency,
|
|
||||||
pcm_is_playing,
|
|
||||||
pcm_play_pause,
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* playback control */
|
/* playback control */
|
||||||
|
@ -216,8 +205,6 @@ struct codec_api ci = {
|
||||||
battery_level,
|
battery_level,
|
||||||
battery_level_safe,
|
battery_level_safe,
|
||||||
|
|
||||||
/* new stuff at the end, sort into place next time
|
|
||||||
the API gets incompatible */
|
|
||||||
#ifdef RB_PROFILE
|
#ifdef RB_PROFILE
|
||||||
profile_thread,
|
profile_thread,
|
||||||
profstop,
|
profstop,
|
||||||
|
@ -225,6 +212,9 @@ struct codec_api ci = {
|
||||||
profile_func_exit,
|
profile_func_exit,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* new stuff at the end, sort into place next time
|
||||||
|
the API gets incompatible */
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
int codec_load_ram(char* codecptr, int size, void* ptr2, int bufwrap,
|
int codec_load_ram(char* codecptr, int size, void* ptr2, int bufwrap,
|
||||||
|
|
|
@ -48,7 +48,6 @@
|
||||||
#endif
|
#endif
|
||||||
#if (CONFIG_CODEC == SWCODEC)
|
#if (CONFIG_CODEC == SWCODEC)
|
||||||
#include "dsp.h"
|
#include "dsp.h"
|
||||||
#include "pcm_playback.h"
|
|
||||||
#include "playback.h"
|
#include "playback.h"
|
||||||
#endif
|
#endif
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
@ -86,12 +85,12 @@
|
||||||
#define CODEC_MAGIC 0x52434F44 /* RCOD */
|
#define CODEC_MAGIC 0x52434F44 /* RCOD */
|
||||||
|
|
||||||
/* increase this every time the api struct changes */
|
/* increase this every time the api struct changes */
|
||||||
#define CODEC_API_VERSION 2
|
#define CODEC_API_VERSION 3
|
||||||
|
|
||||||
/* update this to latest version if a change to the api struct breaks
|
/* update this to latest version if a change to the api struct breaks
|
||||||
backwards compatibility (and please take the opportunity to sort in any
|
backwards compatibility (and please take the opportunity to sort in any
|
||||||
new function which are "waiting" at the end of the function table) */
|
new function which are "waiting" at the end of the function table) */
|
||||||
#define CODEC_MIN_API_VERSION 1
|
#define CODEC_MIN_API_VERSION 3
|
||||||
|
|
||||||
/* codec return codes */
|
/* codec return codes */
|
||||||
enum codec_status {
|
enum codec_status {
|
||||||
|
@ -230,13 +229,6 @@ struct codec_api {
|
||||||
void (*mp3_play_pause)(bool play);
|
void (*mp3_play_pause)(bool play);
|
||||||
void (*mp3_play_stop)(void);
|
void (*mp3_play_stop)(void);
|
||||||
bool (*mp3_is_playing)(void);
|
bool (*mp3_is_playing)(void);
|
||||||
#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);
|
|
||||||
bool (*pcm_is_playing)(void);
|
|
||||||
void (*pcm_play_pause)(bool play);
|
|
||||||
#endif
|
|
||||||
#endif /* !SIMULATOR */
|
#endif /* !SIMULATOR */
|
||||||
|
|
||||||
/* playback control */
|
/* playback control */
|
||||||
|
@ -290,8 +282,6 @@ struct codec_api {
|
||||||
int (*battery_level)(void);
|
int (*battery_level)(void);
|
||||||
bool (*battery_level_safe)(void);
|
bool (*battery_level_safe)(void);
|
||||||
|
|
||||||
/* new stuff at the end, sort into place next time
|
|
||||||
the API gets incompatible */
|
|
||||||
#ifdef RB_PROFILE
|
#ifdef RB_PROFILE
|
||||||
void (*profile_thread)(void);
|
void (*profile_thread)(void);
|
||||||
void (*profstop)(void);
|
void (*profstop)(void);
|
||||||
|
@ -299,6 +289,9 @@ struct codec_api {
|
||||||
void (*profile_func_exit)(void *this_fn, void *call_site);
|
void (*profile_func_exit)(void *this_fn, void *call_site);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* new stuff at the end, sort into place next time
|
||||||
|
the API gets incompatible */
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* codec header */
|
/* codec header */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue