Fixed bug 1949 - Pulseaudio 32 bit audio formats support
authorSam Lantinga <slouken@libsdl.org>
Wed, 10 Jul 2013 22:01:24 -0700
changeset 739708e4eb5cea46
parent 7396 a36ab6149a10
child 7398 31ec14665b79
Fixed bug 1949 - Pulseaudio 32 bit audio formats support

Matt Scheirer

Pulse has supported (since version 0.8, at least) 32 bit audio formats that are now becoming available in SDL2. This patch adds those format conversions to the switch clause in the pulseaudio backend.
src/audio/pulseaudio/SDL_pulseaudio.c
     1.1 --- a/src/audio/pulseaudio/SDL_pulseaudio.c	Wed Jul 10 21:57:31 2013 -0700
     1.2 +++ b/src/audio/pulseaudio/SDL_pulseaudio.c	Wed Jul 10 22:01:24 2013 -0700
     1.3 @@ -360,6 +360,18 @@
     1.4          case AUDIO_S16MSB:
     1.5              paspec.format = PA_SAMPLE_S16BE;
     1.6              break;
     1.7 +        case AUDIO_S32LSB:
     1.8 +            paspec.format = PA_SAMPLE_S32LE;
     1.9 +            break;
    1.10 +        case AUDIO_S32MSB:
    1.11 +            paspec.format = PA_SAMPLE_S32BE;
    1.12 +            break;
    1.13 +        case AUDIO_F32LSB:
    1.14 +            paspec.format = PA_SAMPLE_FLOAT32LE
    1.15 +            break;
    1.16 +        case AUDIO_F32MSB:
    1.17 +            paspec.format = PA_SAMPLE_FLOAT32BE
    1.18 +            break;
    1.19          default:
    1.20              paspec.format = PA_SAMPLE_INVALID;
    1.21              break;