aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/inputPlugins/_flac_common.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/inputPlugins/_flac_common.c b/src/inputPlugins/_flac_common.c
index ddf25a0b9..3085660b3 100644
--- a/src/inputPlugins/_flac_common.c
+++ b/src/inputPlugins/_flac_common.c
@@ -204,15 +204,13 @@ static inline enum dc_action flacSendChunk(FlacData * data)
return ret;
}
-static void flac_convert_stereo16(unsigned char *dest,
+static void flac_convert_stereo16(int16_t *dest,
const FLAC__int32 * const buf[],
unsigned int position, unsigned int end)
{
for (; position < end; ++position) {
- *(uint16_t*)dest = buf[0][position];
- dest += 2;
- *(uint16_t*)dest = buf[1][position];
- dest += 2;
+ *dest++ = buf[0][position];
+ *dest++ = buf[1][position];
}
}
@@ -258,7 +256,7 @@ flac_common_write(FlacData *data, const FLAC__Frame * frame,
num_samples = max_samples;
if (num_channels == 2 && bytes_per_sample == 2)
- flac_convert_stereo16(data->chunk,
+ flac_convert_stereo16((int16_t*)data->chunk,
buf, c_samp,
c_samp + num_samples);
else