Mac OS 9 support for int32/float32.
authorRyan C. Gordon <icculus@icculus.org>
Fri, 01 Sep 2006 06:01:03 +0000
changeset 2004 c27292a690b7
parent 2003 506851d3efa4
child 2005 45af7d69f8eb
Mac OS 9 support for int32/float32.
src/audio/macrom/SDL_romaudio.c
--- a/src/audio/macrom/SDL_romaudio.c	Fri Sep 01 05:31:36 2006 +0000
+++ b/src/audio/macrom/SDL_romaudio.c	Fri Sep 01 06:01:03 2006 +0000
@@ -238,6 +238,9 @@
     case AUDIO_U16MSB:
         spec->format = AUDIO_S16MSB;
         break;
+    case AUDIO_F32LSB:
+        spec->format = AUDIO_F32MSB;
+        break;
     }
     SDL_CalculateAudioSpec(spec);
 
@@ -259,9 +262,18 @@
     header.encode = cmpSH;
 
     /* Note that we install the 16bitLittleEndian Converter if needed. */
-    if (spec->format == 0x8010) {
+    if (spec->format == AUDIO_S16LSB) {
         header.compressionID = fixedCompression;
         header.format = k16BitLittleEndianFormat;
+    } else if (spec->format == AUDIO_S32MSB) {
+        header.compressionID = fixedCompression;
+        header.format = k32BitFormat;
+    } else if (spec->format == AUDIO_S32LSB) {
+        header.compressionID = fixedCompression;
+        header.format = k32BitLittleEndianFormat;
+    } else if (spec->format == AUDIO_F32MSB) {
+        header.compressionID = fixedCompression;
+        header.format = kFloat32Format;
     }
 
     /* allocate 2 buffers */