diff src/audio/macrom/SDL_romaudio.c @ 2004:c27292a690b7

Mac OS 9 support for int32/float32.
author Ryan C. Gordon <icculus@icculus.org>
date Fri, 01 Sep 2006 06:01:03 +0000
parents c121d94672cb
children 5f6550e5184f 8225ef1f4dee
line wrap: on
line diff
--- 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 */