Tweak some PCM drivers for less typecasting with the data pointer.

Yeah, sizeof (void) here with GCC is 1. If something has a problem
with that, we'll set it straight.

Change-Id: I9ad3eee75dd440f6404a04a501d1533c8bc18ba9
This commit is contained in:
Michael Sevakis 2012-03-04 08:52:50 -05:00
parent f6e17e86fe
commit cd8e11b463
6 changed files with 22 additions and 24 deletions

View file

@ -31,8 +31,8 @@
extern JNIEnv *env_ptr;
/* infos about our pcm chunks */
static const void *pcm_data_start;
static size_t pcm_data_size;
static char *pcm_data_start;
static int audio_locked = 0;
static pthread_mutex_t audio_lock_mutex = PTHREAD_MUTEX_INITIALIZER;
@ -81,7 +81,7 @@ Java_org_rockbox_RockboxPCM_nativeWrite(JNIEnv *env, jobject this,
if (!pcm_data_size) /* get some initial data */
{
new_buffer = pcm_play_dma_complete_callback(PCM_DMAST_OK,
(const void**)&pcm_data_start, &pcm_data_size);
&pcm_data_start, &pcm_data_size);
}
while(left > 0 && pcm_data_size)
@ -115,7 +115,7 @@ Java_org_rockbox_RockboxPCM_nativeWrite(JNIEnv *env, jobject this,
if (pcm_data_size == 0) /* need new data */
{
new_buffer = pcm_play_dma_complete_callback(PCM_DMAST_OK,
(const void**)&pcm_data_start, &pcm_data_size);
&pcm_data_start, &pcm_data_size);
}
else /* increment data pointer and feed more */
pcm_data_start += transfer_size;
@ -146,7 +146,7 @@ void pcm_dma_apply_settings(void)
void pcm_play_dma_start(const void *addr, size_t size)
{
pcm_data_start = (char*)addr;
pcm_data_start = addr;
pcm_data_size = size;
pcm_play_dma_pause(false);