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/portaudio.c | |
parent | 5e1d1a52bae6d22565bdfe7042da29e61197d36c (diff) |
Support signed and unsigned 32-bit int output
Diffstat (limited to 'Alc/backends/portaudio.c')
-rw-r--r-- | Alc/backends/portaudio.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Alc/backends/portaudio.c b/Alc/backends/portaudio.c index bb4f9d94..bd3bb4d8 100644 --- a/Alc/backends/portaudio.c +++ b/Alc/backends/portaudio.c @@ -192,6 +192,12 @@ retry_open: case DevFmtShort: outParams.sampleFormat = paInt16; break; + case DevFmtUInt: + device->FmtType = DevFmtInt; + /* fall-through */ + case DevFmtInt: + outParams.sampleFormat = paInt32; + break; case DevFmtFloat: outParams.sampleFormat = paFloat32; break; @@ -316,11 +322,15 @@ static ALCenum pa_open_capture(ALCdevice *device, const ALCchar *deviceName) case DevFmtShort: inParams.sampleFormat = paInt16; break; + case DevFmtInt: + inParams.sampleFormat = paInt32; + break; case DevFmtFloat: inParams.sampleFormat = paFloat32; break; + case DevFmtUInt: case DevFmtUShort: - ERR("Unsigned short samples not supported\n"); + ERR("%s samples not supported\n", DevFmtTypeString(device->FmtType)); goto error; } inParams.channelCount = ChannelsFromDevFmt(device->FmtChans); |