summaryrefslogtreecommitdiff
path: root/apps/plugins/doom/i_sound.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/doom/i_sound.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/doom/i_sound.c')
-rw-r--r--apps/plugins/doom/i_sound.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/plugins/doom/i_sound.c b/apps/plugins/doom/i_sound.c
index 2d7b592818..bdf70c1215 100644
--- a/apps/plugins/doom/i_sound.c
+++ b/apps/plugins/doom/i_sound.c
@@ -457,11 +457,11 @@ void I_UpdateSound( void )
457// only output be done asynchronous? 457// only output be done asynchronous?
458// 458//
459 459
460void get_more(unsigned char** start, size_t* size) 460void get_more(const void** start, size_t* size)
461{ 461{
462 I_UpdateSound(); // Force sound update 462 I_UpdateSound(); // Force sound update
463 463
464 *start = (unsigned char*)(mixbuffer); 464 *start = mixbuffer;
465 *size = SAMPLECOUNT*2*sizeof(short); 465 *size = SAMPLECOUNT*2*sizeof(short);
466} 466}
467 467
@@ -471,7 +471,7 @@ void I_SubmitSound(void)
471 if (!enable_sound) 471 if (!enable_sound)
472 return; 472 return;
473 473
474 rb->pcm_play_data(&get_more, NULL, 0); 474 rb->pcm_play_data(&get_more, NULL, NULL, 0);
475} 475}
476 476
477void I_ShutdownSound(void) 477void I_ShutdownSound(void)