From 69fdb63afbc4db13d3c2f397f9d8fbd4d7cc7699 Mon Sep 17 00:00:00 2001 From: sezero Date: Thu, 25 Jul 2013 11:03:25 +0000 Subject: [PATCH] snd_flac.c (flac_write_func): don't byteswap the 16 bit values. they seem to be in native-endian format. thanks to Levent Yavas for testing on a big endian platform (ppc/OSX 10.4). git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@864 af15c1b1-3010-417e-b628-4374ebc0bcbd --- Quake/snd_flac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Quake/snd_flac.c b/Quake/snd_flac.c index 0bcce00b..d81f3d36 100644 --- a/Quake/snd_flac.c +++ b/Quake/snd_flac.c @@ -157,6 +157,7 @@ flac_write_func (const FLAC__StreamDecoder *decoder, ff->buffer = (byte *) Z_Malloc (ff->info->blocksize * ff->info->channels * ff->info->width); #endif } + if (ff->info->channels == 1) { unsigned i; @@ -197,8 +198,8 @@ flac_write_func (const FLAC__StreamDecoder *decoder, short *ro = (short *) ff->buffer + 1; for (i = 0; i < frame->header.blocksize; i++, lo++, ro++) { - *lo++ = LittleShort (*li++); - *ro++ = LittleShort (*ri++); + *lo++ = *li++; + *ro++ = *ri++; } } }