From: kramm Date: Thu, 11 Nov 2004 21:12:17 +0000 (+0000) Subject: fixed big-endian handling in .sound. X-Git-Tag: release-0-6-3~182 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=a7aa3064bef38531917c0f32f020ff75723cf2e2 fixed big-endian handling in .sound. --- diff --git a/src/swfc.c b/src/swfc.c index cf1ce6d..17fefe6 100644 --- a/src/swfc.c +++ b/src/swfc.c @@ -1110,6 +1110,12 @@ void s_sound(char*name, char*filename) samples = (U16*)wav2.data; numsamples = wav2.size/2; free(wav.data); +#ifdef WORDS_BIGENDIAN + /* swap bytes */ + for(t=0;t>8)&0xff | (samples[t]<<8)&0xff00; + } +#endif } tag = swf_InsertTag(tag, ST_DEFINESOUND);