summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2012-04-27 16:51:54 -0400
committerMichael Sevakis <jethead71@rockbox.org>2012-04-27 16:51:54 -0400
commitfdd363481f81cdc95d2833f611ac1b0402eda069 (patch)
tree02685681b6a3e2c9e9446f8651dbec1041d8fed2
parenta6dea9e13d6e53dacef183bd3cbbb363c2fa2073 (diff)
downloadrockbox-fdd363481f81cdc95d2833f611ac1b0402eda069.tar.gz
rockbox-fdd363481f81cdc95d2833f611ac1b0402eda069.zip
Fix up some more type stuff in pcmbuf.c.
(Never seem to find it all at once :-) Change-Id: I4b3d145c6d90be13f9afc8a72d8d87a92de88d88
-rw-r--r--apps/pcmbuf.c20
-rw-r--r--apps/pcmbuf.h2
2 files changed, 11 insertions, 11 deletions
diff --git a/apps/pcmbuf.c b/apps/pcmbuf.c
index 7ba4eeef8e..d36883fc5b 100644
--- a/apps/pcmbuf.c
+++ b/apps/pcmbuf.c
@@ -91,8 +91,8 @@ struct chunkdesc
91/* General PCM buffer data */ 91/* General PCM buffer data */
92#define INVALID_BUF_INDEX ((size_t)0 - (size_t)1) 92#define INVALID_BUF_INDEX ((size_t)0 - (size_t)1)
93 93
94static unsigned char *pcmbuf_buffer; 94static void *pcmbuf_buffer;
95static unsigned char *pcmbuf_guardbuf; 95static void *pcmbuf_guardbuf;
96static size_t pcmbuf_size; 96static size_t pcmbuf_size;
97static struct chunkdesc *pcmbuf_descriptors; 97static struct chunkdesc *pcmbuf_descriptors;
98static unsigned int pcmbuf_desc_count; 98static unsigned int pcmbuf_desc_count;
@@ -126,7 +126,7 @@ static bool soft_mode = false;
126 126
127#ifdef HAVE_CROSSFADE 127#ifdef HAVE_CROSSFADE
128/* Crossfade buffer */ 128/* Crossfade buffer */
129static unsigned char *crossfade_buffer; 129static void *crossfade_buffer;
130 130
131/* Crossfade related state */ 131/* Crossfade related state */
132static int crossfade_setting; 132static int crossfade_setting;
@@ -496,9 +496,9 @@ static void init_buffer_state(void)
496 496
497/* Initialize the PCM buffer. The structure looks like this: 497/* Initialize the PCM buffer. The structure looks like this:
498 * ...[|FADEBUF]|---------PCMBUF---------|GUARDBUF|DESCS| */ 498 * ...[|FADEBUF]|---------PCMBUF---------|GUARDBUF|DESCS| */
499size_t pcmbuf_init(unsigned char *bufend) 499size_t pcmbuf_init(void *bufend)
500{ 500{
501 unsigned char *bufstart; 501 void *bufstart;
502 502
503 /* Set up the buffers */ 503 /* Set up the buffers */
504 pcmbuf_desc_count = get_next_required_pcmbuf_chunks(); 504 pcmbuf_desc_count = get_next_required_pcmbuf_chunks();
@@ -844,7 +844,7 @@ static size_t crossfade_mix_fade(int factor, size_t size, void *buf,
844 return size; 844 return size;
845 845
846 const int16_t *input_buf = buf; 846 const int16_t *input_buf = buf;
847 int16_t *output_buf = (int16_t *)index_buffer(index); 847 int16_t *output_buf = index_buffer(index);
848 848
849 while (size) 849 while (size)
850 { 850 {
@@ -912,7 +912,7 @@ static size_t crossfade_mix_fade(int factor, size_t size, void *buf,
912 return size; 912 return size;
913 } 913 }
914 914
915 output_buf = (int16_t *)index_buffer(index); 915 output_buf = index_buffer(index);
916 } 916 }
917 } 917 }
918 918
@@ -1042,7 +1042,7 @@ static void crossfade_start(void)
1042/* Perform fade-in of new track */ 1042/* Perform fade-in of new track */
1043static void write_to_crossfade(size_t size, unsigned long elapsed, off_t offset) 1043static void write_to_crossfade(size_t size, unsigned long elapsed, off_t offset)
1044{ 1044{
1045 unsigned char *buf = crossfade_buffer; 1045 void *buf = crossfade_buffer;
1046 1046
1047 if (crossfade_fade_in_rem) 1047 if (crossfade_fade_in_rem)
1048 { 1048 {
@@ -1072,7 +1072,7 @@ static void write_to_crossfade(size_t size, unsigned long elapsed, off_t offset)
1072 1072
1073 /* Fade remaining samples in place */ 1073 /* Fade remaining samples in place */
1074 int samples = fade_rem / 4; 1074 int samples = fade_rem / 4;
1075 int16_t *input_buf = (int16_t *)buf; 1075 int16_t *input_buf = buf;
1076 1076
1077 while (samples--) 1077 while (samples--)
1078 { 1078 {
@@ -1102,7 +1102,7 @@ static void write_to_crossfade(size_t size, unsigned long elapsed, off_t offset)
1102 while (size > 0) 1102 while (size > 0)
1103 { 1103 {
1104 size_t copy_n = size; 1104 size_t copy_n = size;
1105 unsigned char *outbuf = get_write_buffer(&copy_n); 1105 void *outbuf = get_write_buffer(&copy_n);
1106 memcpy(outbuf, buf, copy_n); 1106 memcpy(outbuf, buf, copy_n);
1107 commit_write_buffer(copy_n, elapsed, offset); 1107 commit_write_buffer(copy_n, elapsed, offset);
1108 buf += copy_n; 1108 buf += copy_n;
diff --git a/apps/pcmbuf.h b/apps/pcmbuf.h
index 9010fcc64d..7fa3563e6a 100644
--- a/apps/pcmbuf.h
+++ b/apps/pcmbuf.h
@@ -28,7 +28,7 @@ void *pcmbuf_request_buffer(int *count);
28void pcmbuf_write_complete(int count, unsigned long elapsed, off_t offset); 28void pcmbuf_write_complete(int count, unsigned long elapsed, off_t offset);
29 29
30/* Init */ 30/* Init */
31size_t pcmbuf_init(unsigned char *bufend); 31size_t pcmbuf_init(void *bufend);
32 32
33/* Playback */ 33/* Playback */
34void pcmbuf_play_start(void); 34void pcmbuf_play_start(void);