mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Move implementation of codec_get_buffer() to codec.c, make related variables static.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29839 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b452fa061d
commit
d68d02ec11
3 changed files with 23 additions and 21 deletions
|
@ -208,19 +208,6 @@ void codec_thread_do_callback(void (*fn)(void), unsigned int *id)
|
|||
|
||||
/** --- codec API callbacks --- **/
|
||||
|
||||
static void * codec_get_buffer(size_t *size)
|
||||
{
|
||||
ssize_t s = CODEC_SIZE - codec_size;
|
||||
void *buf = &codecbuf[codec_size];
|
||||
ALIGN_BUFFER(buf, s, CACHEALIGN_SIZE);
|
||||
|
||||
if (s <= 0)
|
||||
return NULL;
|
||||
|
||||
*size = s;
|
||||
return buf;
|
||||
}
|
||||
|
||||
static void codec_pcmbuf_insert_callback(
|
||||
const void *ch1, const void *ch2, int count)
|
||||
{
|
||||
|
@ -420,7 +407,7 @@ void codec_init_codec_api(void)
|
|||
{
|
||||
ci.dsp = (struct dsp_config *)dsp_configure(NULL, DSP_MYDSP,
|
||||
CODEC_IDX_AUDIO);
|
||||
ci.codec_get_buffer = codec_get_buffer;
|
||||
ci.codec_get_buffer = codeclib_get_buffer;
|
||||
ci.pcmbuf_insert = codec_pcmbuf_insert_callback;
|
||||
ci.set_elapsed = audio_codec_update_elapsed;
|
||||
ci.read_filebuf = codec_filebuf_callback;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue