forked from len0rd/rockbox
Commit FS#12069 - Playback rework - first stages. Gives as thorough as possible a treatment of codec management, track change and metadata logic as possible while maintaining fairly narrow focus and not rewriting everything all at once. Please see the rockbox-dev mail archive on 2011-04-25 (Playback engine rework) for a more thorough manifest of what was addressed. Plugins and codecs become incompatible.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29785 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
dcf0f8de4a
commit
c537d5958e
62 changed files with 6047 additions and 4221 deletions
|
@ -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 */
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue