aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm_convert.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-07 19:00:02 +0100
committerMax Kellermann <max@duempel.org>2009-01-07 19:00:02 +0100
commit04a2138b3329e189c87c6bedb39b8a975da53565 (patch)
treed262ddc9d5a77112b949ec52899f14d43d262de9 /src/pcm_convert.c
parentbb01016400e0f36ac1ae8781314682db5fe207ca (diff)
downloadmpd-04a2138b3329e189c87c6bedb39b8a975da53565.tar.gz
mpd-04a2138b3329e189c87c6bedb39b8a975da53565.tar.xz
mpd-04a2138b3329e189c87c6bedb39b8a975da53565.zip
pcm: pass void pointers to PCM functions
In generic PCM functions allowing all sample formats, pass a void pointer instead of a char pointer.
Diffstat (limited to '')
-rw-r--r--src/pcm_convert.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/pcm_convert.c b/src/pcm_convert.c
index 283befd8c..f9fc9a64b 100644
--- a/src/pcm_convert.c
+++ b/src/pcm_convert.c
@@ -117,21 +117,20 @@ pcm_convert_24(const struct audio_format *src_format,
return len;
}
-/* outFormat bits must be 16 and channels must be 1 or 2! */
size_t pcm_convert(const struct audio_format *inFormat,
- const char *src, size_t src_size,
+ const void *src, size_t src_size,
const struct audio_format *outFormat,
- char *outBuffer,
+ void *dest,
struct pcm_convert_state *convState)
{
switch (outFormat->bits) {
case 16:
return pcm_convert_16(inFormat, src, src_size,
- outFormat, (int16_t*)outBuffer,
+ outFormat, (int16_t*)dest,
convState);
case 24:
return pcm_convert_24(inFormat, src, src_size,
- outFormat, (int32_t*)outBuffer,
+ outFormat, (int32_t*)dest,
convState);
default: