Mac OS 9 support for int32/float32.
authorRyan C. Gordon <icculus@icculus.org>
Fri, 01 Sep 2006 06:01:03 +0000
changeset 2004c27292a690b7
parent 2003 506851d3efa4
child 2005 45af7d69f8eb
Mac OS 9 support for int32/float32.
src/audio/macrom/SDL_romaudio.c
     1.1 --- a/src/audio/macrom/SDL_romaudio.c	Fri Sep 01 05:31:36 2006 +0000
     1.2 +++ b/src/audio/macrom/SDL_romaudio.c	Fri Sep 01 06:01:03 2006 +0000
     1.3 @@ -238,6 +238,9 @@
     1.4      case AUDIO_U16MSB:
     1.5          spec->format = AUDIO_S16MSB;
     1.6          break;
     1.7 +    case AUDIO_F32LSB:
     1.8 +        spec->format = AUDIO_F32MSB;
     1.9 +        break;
    1.10      }
    1.11      SDL_CalculateAudioSpec(spec);
    1.12  
    1.13 @@ -259,9 +262,18 @@
    1.14      header.encode = cmpSH;
    1.15  
    1.16      /* Note that we install the 16bitLittleEndian Converter if needed. */
    1.17 -    if (spec->format == 0x8010) {
    1.18 +    if (spec->format == AUDIO_S16LSB) {
    1.19          header.compressionID = fixedCompression;
    1.20          header.format = k16BitLittleEndianFormat;
    1.21 +    } else if (spec->format == AUDIO_S32MSB) {
    1.22 +        header.compressionID = fixedCompression;
    1.23 +        header.format = k32BitFormat;
    1.24 +    } else if (spec->format == AUDIO_S32LSB) {
    1.25 +        header.compressionID = fixedCompression;
    1.26 +        header.format = k32BitLittleEndianFormat;
    1.27 +    } else if (spec->format == AUDIO_F32MSB) {
    1.28 +        header.compressionID = fixedCompression;
    1.29 +        header.format = kFloat32Format;
    1.30      }
    1.31  
    1.32      /* allocate 2 buffers */