forked from len0rd/rockbox
Rework PCM buffer
* Linked list instead of static array buffer pointers * Variable sized chunks * Improved mix handling * Reduction in duplicated code * Reduced IRAM usage w/o sacrificing performance * Converted to almost entirely unsigned math * Add pause function to reduce pcm_* exposure to playback. This WILL break playback on the iPod until linuxstb makes a followup commit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8612 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
566ce5f951
commit
413da2a3d9
13 changed files with 667 additions and 531 deletions
|
|
@ -736,18 +736,8 @@ void prepare_tock(void)
|
|||
}
|
||||
}
|
||||
|
||||
void callback_pcm(unsigned char** start, long* size)
|
||||
{
|
||||
if(sound_active) {
|
||||
*start = (unsigned char *)sndbuf;
|
||||
*size = sizeof(sndbuf);
|
||||
sound_active = false;
|
||||
}
|
||||
}
|
||||
|
||||
void play_tock(void) {
|
||||
sound_active = true;
|
||||
rb->pcm_play_data(callback_pcm);
|
||||
rb->pcm_play_data(NULL,(unsigned char *)sndbuf,sizeof(sndbuf));
|
||||
tock++;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue