src/audio/windx5/SDL_dx5audio.c
changeset 2008 4ad1e863d100
parent 1895 c121d94672cb
child 2049 5f6550e5184f
child 3798 c8b3d3d13ed1
     1.1 --- a/src/audio/windx5/SDL_dx5audio.c	Fri Sep 01 06:55:41 2006 +0000
     1.2 +++ b/src/audio/windx5/SDL_dx5audio.c	Fri Sep 01 07:50:36 2006 +0000
     1.3 @@ -658,7 +658,7 @@
     1.4      waveformat.wFormatTag = WAVE_FORMAT_PCM;
     1.5  
     1.6      /* Determine the audio parameters from the AudioSpec */
     1.7 -    switch (spec->format & 0xFF) {
     1.8 +    switch (SDL_AUDIO_BITSIZE(spec->format)) {
     1.9      case 8:
    1.10          /* Unsigned 8 bit audio data */
    1.11          spec->format = AUDIO_U8;
    1.12 @@ -671,6 +671,12 @@
    1.13          silence = 0x00;
    1.14          waveformat.wBitsPerSample = 16;
    1.15          break;
    1.16 +    case 32:
    1.17 +        /* Signed 32 bit audio data */
    1.18 +        spec->format = AUDIO_S32;
    1.19 +        silence = 0x00;
    1.20 +        waveformat.wBitsPerSample = 32;
    1.21 +        break;
    1.22      default:
    1.23          SDL_SetError("Unsupported audio format");
    1.24          return (-1);