changeset 257:7c4f6ee02cd0

Changed magic number to be bigendian.
author Ryan C. Gordon <icculus@icculus.org>
date Mon, 11 Feb 2002 08:30:23 +0000
parents c6b7f7999a0e
children 8fa2a9b2642e
files decoders/au.c
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/decoders/au.c	Mon Feb 11 08:11:09 2002 +0000
+++ b/decoders/au.c	Mon Feb 11 08:30:23 2002 +0000
@@ -124,7 +124,7 @@
 };
 
 
-#define AU_MAGIC 0x646E732E  /* ".snd", in ASCII */
+#define AU_MAGIC 0x2E736E64  /* ".snd", in ASCII (bigendian number) */
 
 static int AU_open(Sound_Sample *sample, const char *ext)
 {
@@ -145,11 +145,7 @@
         return(0);
     } /* if */
 
-        /*
-         * !!! FIXME: For correctness, we should calculate this as a bigendian
-         * !!! FIXME:  number, which means swapping AU_MAGIC around.
-         */
-    if (SDL_SwapLE32(hdr.magic) == AU_MAGIC)
+    if (SDL_SwapBE32(hdr.magic) == AU_MAGIC)
     {
         /* valid magic */
         dec->encoding = SDL_SwapBE32(hdr.encoding);