From 286a4c5caa1945c8d1cb365a3d90fb09d5700cb2 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Thu, 23 Feb 2012 08:14:46 -0500 Subject: 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 Tested-by: Michael Sevakis --- apps/plugins/mikmod/mikmod.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'apps/plugins/mikmod') 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) VC_WriteBytes(outptr, BUF_SIZE); } -void get_more(unsigned char** start, size_t* size) +void get_more(const void** start, size_t* size) { #ifndef SYNC if (lastswap != swap) @@ -282,10 +282,10 @@ void get_more(unsigned char** start, size_t* size) *size = BUF_SIZE; #ifndef SYNC - *start = (unsigned char*)((swap ? gmbuf : gmbuf + BUF_SIZE)); + *start = swap ? gmbuf : gmbuf + BUF_SIZE; swap = !swap; #else - *start = (unsigned char*)(gmbuf); + *start = gmbuf; #endif } @@ -660,7 +660,7 @@ int playfile(char* filename) { display = DISPLAY_INFO; Player_Start(module); - rb->pcm_play_data(&get_more, NULL, 0); + rb->pcm_play_data(&get_more, NULL, NULL, 0); } #ifdef HAVE_ADJUSTABLE_CPU_FREQ @@ -804,7 +804,7 @@ int playfile(char* filename) } else { - rb->pcm_play_data(&get_more, NULL, 0); + rb->pcm_play_data(&get_more, NULL, NULL, 0); } Player_TogglePause(); break; -- cgit