diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2012-02-23 08:14:46 -0500 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2012-03-03 07:23:38 +0100 |
commit | 286a4c5caa1945c8d1cb365a3d90fb09d5700cb2 (patch) | |
tree | 4835f46d16ec78d035ec9f49333079fe618384c1 /apps/plugins/mikmod | |
parent | 3f82f3aca14eb954e55f761721ffdd2684f0e812 (diff) | |
download | rockbox-286a4c5caa1945c8d1cb365a3d90fb09d5700cb2.tar.gz rockbox-286a4c5caa1945c8d1cb365a3d90fb09d5700cb2.zip |
Revise the PCM callback system after adding multichannel audio.
Additional status callback is added to pcm_play/rec_data instead of
using a special function to set it. Status includes DMA error
reporting to the status callback. Playback and recording callback
become more alike except playback uses "const void **addr" (because
the data should not be altered) and recording uses "void **addr".
"const" is put in place throughout where appropriate.
Most changes are fairly trivial. One that should be checked in
particular because it isn't so much is telechips, if anyone cares to
bother. PP5002 is not so trivial either but that tested as working.
Change-Id: I4928d69b3b3be7fb93e259f81635232df9bd1df2
Reviewed-on: http://gerrit.rockbox.org/166
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested-by: Michael Sevakis <jethead71@rockbox.org>
Diffstat (limited to 'apps/plugins/mikmod')
-rw-r--r-- | apps/plugins/mikmod/mikmod.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/plugins/mikmod/mikmod.c b/apps/plugins/mikmod/mikmod.c index a7eeb5019f..eb3be13140 100644 --- a/apps/plugins/mikmod/mikmod.c +++ b/apps/plugins/mikmod/mikmod.c | |||
@@ -268,7 +268,7 @@ static inline void synthbuf(void) | |||
268 | VC_WriteBytes(outptr, BUF_SIZE); | 268 | VC_WriteBytes(outptr, BUF_SIZE); |
269 | } | 269 | } |
270 | 270 | ||
271 | void get_more(unsigned char** start, size_t* size) | 271 | void get_more(const void** start, size_t* size) |
272 | { | 272 | { |
273 | #ifndef SYNC | 273 | #ifndef SYNC |
274 | if (lastswap != swap) | 274 | if (lastswap != swap) |
@@ -282,10 +282,10 @@ void get_more(unsigned char** start, size_t* size) | |||
282 | 282 | ||
283 | *size = BUF_SIZE; | 283 | *size = BUF_SIZE; |
284 | #ifndef SYNC | 284 | #ifndef SYNC |
285 | *start = (unsigned char*)((swap ? gmbuf : gmbuf + BUF_SIZE)); | 285 | *start = swap ? gmbuf : gmbuf + BUF_SIZE; |
286 | swap = !swap; | 286 | swap = !swap; |
287 | #else | 287 | #else |
288 | *start = (unsigned char*)(gmbuf); | 288 | *start = gmbuf; |
289 | #endif | 289 | #endif |
290 | } | 290 | } |
291 | 291 | ||
@@ -660,7 +660,7 @@ int playfile(char* filename) | |||
660 | { | 660 | { |
661 | display = DISPLAY_INFO; | 661 | display = DISPLAY_INFO; |
662 | Player_Start(module); | 662 | Player_Start(module); |
663 | rb->pcm_play_data(&get_more, NULL, 0); | 663 | rb->pcm_play_data(&get_more, NULL, NULL, 0); |
664 | } | 664 | } |
665 | 665 | ||
666 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | 666 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ |
@@ -804,7 +804,7 @@ int playfile(char* filename) | |||
804 | } | 804 | } |
805 | else | 805 | else |
806 | { | 806 | { |
807 | rb->pcm_play_data(&get_more, NULL, 0); | 807 | rb->pcm_play_data(&get_more, NULL, NULL, 0); |
808 | } | 808 | } |
809 | Player_TogglePause(); | 809 | Player_TogglePause(); |
810 | break; | 810 | break; |