From: kramm Date: Thu, 11 Nov 2004 09:34:22 +0000 (+0000) Subject: added big endian handling X-Git-Tag: release-0-6-3~191 X-Git-Url: http://git.asbjorn.it/?a=commitdiff_plain;h=4da4084fff707d9df8bddc66fb6f641193b70a17;p=swftools.git added big endian handling --- diff --git a/src/wav2swf.c b/src/wav2swf.c index 87cb005..f6d3b2c 100644 --- a/src/wav2swf.c +++ b/src/wav2swf.c @@ -238,6 +238,13 @@ int main (int argc,char ** argv) samples = (U16*)wav2.data; numsamples = wav2.size/2; +#ifdef WORDS_BIGENDIAN + /* swap bytes */ + for(t=0;t>8)&0xff | (samples[t]<<8)&0xff00; + } +#endif + if(numsamples%blocksize != 0) { // apply padding, so that block is a multiple of blocksize