aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 5a98e63bc..427956c39 100644
--- a/src/inputPlugins/_flac_common.c
+++ b/src/inputPlugins/_flac_common.c
@@ -209,15 +209,13 @@ static inline int flacSendChunk(FlacData * data)
return 0;
}
-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];
}
}
@@ -264,7 +262,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