summaryrefslogtreecommitdiffstats
path: root/polyp/sample-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-09-01 00:46:56 +0000
committerLennart Poettering <lennart@poettering.net>2004-09-01 00:46:56 +0000
commit36550f4a66ae28e1b81b9b818c38cd0fcd1302a1 (patch)
treec76806652672d381462d3c0b6fe03995a80aae34 /polyp/sample-util.c
parent34fe8bd893ed9c7531bc4898b934ef9d4cdf3e68 (diff)
remove most -W compiler warnings
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@164 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/sample-util.c')
-rw-r--r--polyp/sample-util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/polyp/sample-util.c b/polyp/sample-util.c
index 6a09478f..51b22fbe 100644
--- a/polyp/sample-util.c
+++ b/polyp/sample-util.c
@@ -37,7 +37,7 @@ struct pa_memblock *pa_silence_memblock(struct pa_memblock* b, const struct pa_s
void pa_silence_memchunk(struct pa_memchunk *c, const struct pa_sample_spec *spec) {
assert(c && c->memblock && c->memblock->data && spec && c->length);
- pa_silence_memory(c->memblock->data+c->index, c->length, spec);
+ pa_silence_memory((uint8_t*) c->memblock->data+c->index, c->length, spec);
}
void pa_silence_memory(void *p, size_t length, const struct pa_sample_spec *spec) {
@@ -85,7 +85,7 @@ size_t pa_mix(struct pa_mix_info channels[], unsigned nchannels, void *data, siz
if (volume == PA_VOLUME_MUTED)
v = 0;
else {
- v = *((int16_t*) (channels[c].chunk.memblock->data + channels[c].chunk.index + d));
+ v = *((int16_t*) ((uint8_t*) channels[c].chunk.memblock->data + channels[c].chunk.index + d));
if (volume != PA_VOLUME_NORM)
v = (int32_t) ((float)v*volume/PA_VOLUME_NORM);
@@ -103,7 +103,7 @@ size_t pa_mix(struct pa_mix_info channels[], unsigned nchannels, void *data, siz
if (sum > 0x7FFF) sum = 0x7FFF;
*((int16_t*) data) = sum;
- data += sizeof(int16_t);
+ data = (uint8_t*) data + sizeof(int16_t);
}
}
@@ -122,7 +122,7 @@ void pa_volume_memchunk(struct pa_memchunk*c, const struct pa_sample_spec *spec,
return;
}
- for (d = (c->memblock->data+c->index), n = c->length/sizeof(int16_t); n > 0; d++, n--) {
+ for (d = (int16_t*) ((uint8_t*) c->memblock->data+c->index), n = c->length/sizeof(int16_t); n > 0; d++, n--) {
int32_t t = (int32_t)(*d);
t *= volume;