summaryrefslogtreecommitdiffstats
path: root/apps/plugins/mikmod/mikmod.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2012-02-23 08:14:46 -0500
committerMichael Sevakis <jethead71@rockbox.org>2012-03-03 07:23:38 +0100
commit286a4c5caa1945c8d1cb365a3d90fb09d5700cb2 (patch)
tree4835f46d16ec78d035ec9f49333079fe618384c1 /apps/plugins/mikmod/mikmod.c
parent3f82f3aca14eb954e55f761721ffdd2684f0e812 (diff)
downloadrockbox-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/mikmod.c')
-rw-r--r--apps/plugins/mikmod/mikmod.c10
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)
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;