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/coreaudio.c | |
parent | 5e1d1a52bae6d22565bdfe7042da29e61197d36c (diff) |
Support signed and unsigned 32-bit int output
Diffstat (limited to 'Alc/backends/coreaudio.c')
-rw-r--r-- | Alc/backends/coreaudio.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Alc/backends/coreaudio.c b/Alc/backends/coreaudio.c index ad5f0c16..0a1c1e76 100644 --- a/Alc/backends/coreaudio.c +++ b/Alc/backends/coreaudio.c @@ -296,6 +296,14 @@ static ALCboolean ca_reset_playback(ALCdevice *device) streamFormat.mBytesPerPacket = 2 * streamFormat.mChannelsPerFrame; streamFormat.mBytesPerFrame = 2 * streamFormat.mChannelsPerFrame; break; + case DevFmtUInt: + device->FmtType = DevFmtInt; + /* fall-through */ + case DevFmtInt: + streamFormat.mBitsPerChannel = 32; + streamFormat.mBytesPerPacket = 2 * streamFormat.mChannelsPerFrame; + streamFormat.mBytesPerFrame = 2 * streamFormat.mChannelsPerFrame; + break; } streamFormat.mFormatID = kAudioFormatLinearPCM; streamFormat.mFormatFlags = kLinearPCMFormatFlagIsSignedInteger | @@ -455,12 +463,17 @@ static ALCenum ca_open_capture(ALCdevice *device, const ALCchar *deviceName) requestedFormat.mBitsPerChannel = 16; requestedFormat.mFormatFlags = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked; break; + case DevFmtInt: + requestedFormat.mBitsPerChannel = 32; + requestedFormat.mFormatFlags = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked; + break; case DevFmtFloat: requestedFormat.mBitsPerChannel = 32; requestedFormat.mFormatFlags = kAudioFormatFlagIsPacked; break; case DevFmtByte: case DevFmtUShort: + case DevFmtUInt: ERR("%s samples not supported\n", DevFmtTypeString(device->FmtType)); goto error; } |