diff options
| author | Brandon Low <lostlogic@rockbox.org> | 2006-02-07 20:38:55 +0000 |
|---|---|---|
| committer | Brandon Low <lostlogic@rockbox.org> | 2006-02-07 20:38:55 +0000 |
| commit | 413da2a3d93d989d4474edad437ff67888487cb9 (patch) | |
| tree | ecf938aa0aedc92db749be69e62648050f2fd712 /apps/plugins | |
| parent | 566ce5f95163f8bbb7357dc7353bb132365f7b6e (diff) | |
| download | rockbox-413da2a3d93d989d4474edad437ff67888487cb9.zip rockbox-413da2a3d93d989d4474edad437ff67888487cb9.tar.gz rockbox-413da2a3d93d989d4474edad437ff67888487cb9.tar.bz2 rockbox-413da2a3d93d989d4474edad437ff67888487cb9.tar.xz | |
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
Diffstat (limited to 'apps/plugins')
| -rw-r--r-- | apps/plugins/metronome.c | 12 | ||||
| -rw-r--r-- | apps/plugins/rockboy/rbsound.c | 4 |
2 files changed, 3 insertions, 13 deletions
diff --git a/apps/plugins/metronome.c b/apps/plugins/metronome.c index 2f897d7..ac4a990 100644 --- a/apps/plugins/metronome.c +++ b/apps/plugins/metronome.c @@ -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++; } diff --git a/apps/plugins/rockboy/rbsound.c b/apps/plugins/rockboy/rbsound.c index 3eebea8..6371212 100644 --- a/apps/plugins/rockboy/rbsound.c +++ b/apps/plugins/rockboy/rbsound.c @@ -35,7 +35,7 @@ static unsigned short *gmbuf; static bool newly_started; -void get_more(unsigned char** start, long* size) +void get_more(unsigned char** start, size_t* size) { #ifdef ONEBUF doneplay=1; @@ -108,7 +108,7 @@ int pcm_submit(void) if(newly_started) { - rb->pcm_play_data(&get_more); + rb->pcm_play_data(&get_more,NULL,0); newly_started = false; } |