git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8825d41
)
added big endian handling
author
kramm
<kramm>
Thu, 11 Nov 2004 09:34:22 +0000
(09:34 +0000)
committer
kramm
<kramm>
Thu, 11 Nov 2004 09:34:22 +0000
(09:34 +0000)
src/wav2swf.c
patch
|
blob
|
history
diff --git
a/src/wav2swf.c
b/src/wav2swf.c
index
87cb005
..
f6d3b2c
100644
(file)
--- 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<numsamples;t++) {
+ samples[t] = (samples[t]>>8)&0xff | (samples[t]<<8)&0xff00;
+ }
+#endif
+
if(numsamples%blocksize != 0)
{
// apply padding, so that block is a multiple of blocksize