summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/android/pcm-android.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2012-03-04 08:52:50 -0500
committerMichael Sevakis <jethead71@rockbox.org>2012-03-04 08:52:50 -0500
commitcd8e11b463bf57f832bf44d350238057db3e2d6d (patch)
tree91b7511ec5a6fa47c99d84518608cd3b90f4d680 /firmware/target/hosted/android/pcm-android.c
parentf6e17e86fed65cb503199691d69973e83c45ddbf (diff)
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
Diffstat (limited to 'firmware/target/hosted/android/pcm-android.c')
-rw-r--r--firmware/target/hosted/android/pcm-android.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/target/hosted/android/pcm-android.c b/firmware/target/hosted/android/pcm-android.c
index 7a0f28634e..0428e5f541 100644
--- a/firmware/target/hosted/android/pcm-android.c
+++ b/firmware/target/hosted/android/pcm-android.c
@@ -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);