diff options
Diffstat (limited to 'apps/pcmbuf.c')
-rw-r--r-- | apps/pcmbuf.c | 20 |
1 files changed, 10 insertions, 10 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 | ||
94 | static unsigned char *pcmbuf_buffer; | 94 | static void *pcmbuf_buffer; |
95 | static unsigned char *pcmbuf_guardbuf; | 95 | static void *pcmbuf_guardbuf; |
96 | static size_t pcmbuf_size; | 96 | static size_t pcmbuf_size; |
97 | static struct chunkdesc *pcmbuf_descriptors; | 97 | static struct chunkdesc *pcmbuf_descriptors; |
98 | static unsigned int pcmbuf_desc_count; | 98 | static 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 */ |
129 | static unsigned char *crossfade_buffer; | 129 | static void *crossfade_buffer; |
130 | 130 | ||
131 | /* Crossfade related state */ | 131 | /* Crossfade related state */ |
132 | static int crossfade_setting; | 132 | static 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| */ |
499 | size_t pcmbuf_init(unsigned char *bufend) | 499 | size_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 */ |
1043 | static void write_to_crossfade(size_t size, unsigned long elapsed, off_t offset) | 1043 | static 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(©_n); | 1105 | void *outbuf = get_write_buffer(©_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; |