ref: 75cdcfdf17173949613de02240b61f4b3dd03a9e
parent: 1c4b3fa8155b442d2b108e7adb0df3358c88d3f8
author: cbagwell <cbagwell>
date: Sat Sep 15 23:02:09 EDT 2001
Fixing bugs in SMP detection and endian code.
--- a/src/auto.c
+++ b/src/auto.c
@@ -71,6 +71,10 @@
{
type = "hcom";
}
+ else if (strncmp(header, "SOUND SAMPLE DATA", 17) == 0)
+ {
+ type = "smp";
+ }
else if (strncmp(header, "SOUND", 5) == 0)
{
type = "sndt";
--- a/src/smp.c
+++ b/src/smp.c
@@ -205,7 +205,7 @@
/* SMP is in Little Endian format. Swap whats read in on */
/* Big Endian machines. */
- if (ST_IS_LITTLEENDIAN)
+ if (ST_IS_BIGENDIAN)
{
ft->swap = ft->swap ? 0 : 1;
}
@@ -359,7 +359,7 @@
/* SMP is in Little Endian format. Swap whats read in on */
/* Big Endian machines. */
- if (ST_IS_LITTLEENDIAN)
+ if (ST_IS_BIGENDIAN)
{
ft->swap = ft->swap ? 0 : 1;
}