diff decoders/au.c @ 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 c9772a9f5271
children 9828311da44b
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);