diff options
Diffstat (limited to 'apps/codecs/lib/codeclib.c')
| -rw-r--r-- | apps/codecs/lib/codeclib.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/apps/codecs/lib/codeclib.c b/apps/codecs/lib/codeclib.c index af0894c..443c0bb 100644 --- a/apps/codecs/lib/codeclib.c +++ b/apps/codecs/lib/codeclib.c @@ -33,6 +33,16 @@ unsigned char* mp3buf; // The actual MP3 buffer from Rockbox unsigned char* mallocbuf; // 512K from the start of MP3 buffer unsigned char* filebuf; // The rest of the MP3 buffer +/* this is the default codec entry point for when nothing needs to be done + on load or unload */ +enum codec_status __attribute__((weak)) +codec_main(enum codec_entry_call_reason reason) +{ + /* Nothing to do */ + return CODEC_OK; + (void)reason; +} + int codec_init(void) { mem_ptr = 0; @@ -41,7 +51,7 @@ int codec_init(void) return 0; } -void codec_set_replaygain(struct mp3entry* id3) +void codec_set_replaygain(const struct mp3entry *id3) { ci->configure(DSP_SET_TRACK_GAIN, id3->track_gain); ci->configure(DSP_SET_ALBUM_GAIN, id3->album_gain); @@ -49,19 +59,6 @@ void codec_set_replaygain(struct mp3entry* id3) ci->configure(DSP_SET_ALBUM_PEAK, id3->album_peak); } -/* Note: codec really needs its own private metdata copy for the current - track being processed in order to be stable. */ -int codec_wait_taginfo(void) -{ - while (!*ci->taginfo_ready && !ci->stop_codec && !ci->new_track) - ci->sleep(0); - if (ci->stop_codec) - return -1; - if (ci->new_track) - return 1; - return 0; -} - /* Various "helper functions" common to all the xxx2wav decoder plugins */ |