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
This commit is contained in:
sezero 2013-07-25 11:03:25 +00:00
parent 3349866c81
commit 69fdb63afb
1 changed files with 3 additions and 2 deletions

View File

@ -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); ff->buffer = (byte *) Z_Malloc (ff->info->blocksize * ff->info->channels * ff->info->width);
#endif #endif
} }
if (ff->info->channels == 1) if (ff->info->channels == 1)
{ {
unsigned i; unsigned i;
@ -197,8 +198,8 @@ flac_write_func (const FLAC__StreamDecoder *decoder,
short *ro = (short *) ff->buffer + 1; short *ro = (short *) ff->buffer + 1;
for (i = 0; i < frame->header.blocksize; i++, lo++, ro++) for (i = 0; i < frame->header.blocksize; i++, lo++, ro++)
{ {
*lo++ = LittleShort (*li++); *lo++ = *li++;
*ro++ = LittleShort (*ri++); *ro++ = *ri++;
} }
} }
} }