diff options
author | Chris Robinson <[email protected]> | 2012-02-14 11:44:57 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-02-14 11:44:57 -0800 |
commit | 1140b3ae837437966c9d2474fca8aa17d8193aa5 (patch) | |
tree | 6006870627cde536874d1b4aa9fe487655296534 /Alc/backends/pulseaudio.c | |
parent | 5e1d1a52bae6d22565bdfe7042da29e61197d36c (diff) |
Support signed and unsigned 32-bit int output
Diffstat (limited to 'Alc/backends/pulseaudio.c')
-rw-r--r-- | Alc/backends/pulseaudio.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Alc/backends/pulseaudio.c b/Alc/backends/pulseaudio.c index b8a7aa50..041dfe83 100644 --- a/Alc/backends/pulseaudio.c +++ b/Alc/backends/pulseaudio.c @@ -953,6 +953,12 @@ static ALCboolean pulse_reset_playback(ALCdevice *device) //{{{ case DevFmtShort: data->spec.format = PA_SAMPLE_S16NE; break; + case DevFmtUInt: + device->FmtType = DevFmtInt; + /* fall-through */ + case DevFmtInt: + data->spec.format = PA_SAMPLE_S32NE; + break; case DevFmtFloat: data->spec.format = PA_SAMPLE_FLOAT32NE; break; @@ -1150,11 +1156,15 @@ static ALCenum pulse_open_capture(ALCdevice *device, const ALCchar *device_name) case DevFmtShort: data->spec.format = PA_SAMPLE_S16NE; break; + case DevFmtInt: + data->spec.format = PA_SAMPLE_S32NE; + break; case DevFmtFloat: data->spec.format = PA_SAMPLE_FLOAT32NE; break; case DevFmtByte: case DevFmtUShort: + case DevFmtUInt: ERR("Capture format type %#x capture not supported on PulseAudio\n", device->FmtType); pa_threaded_mainloop_unlock(data->loop); goto fail; |