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/mmdevapi.c | |
parent | 5e1d1a52bae6d22565bdfe7042da29e61197d36c (diff) |
Support signed and unsigned 32-bit int output
Diffstat (limited to 'Alc/backends/mmdevapi.c')
-rw-r--r-- | Alc/backends/mmdevapi.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Alc/backends/mmdevapi.c b/Alc/backends/mmdevapi.c index f171c059..c6a25f81 100644 --- a/Alc/backends/mmdevapi.c +++ b/Alc/backends/mmdevapi.c @@ -294,6 +294,14 @@ static HRESULT DoReset(ALCdevice *device) OutputType.Samples.wValidBitsPerSample = 16; OutputType.SubFormat = KSDATAFORMAT_SUBTYPE_PCM; break; + case DevFmtUInt: + device->FmtType = DevFmtInt; + /* fall-through */ + case DevFmtInt: + OutputType.Format.wBitsPerSample = 32; + OutputType.Samples.wValidBitsPerSample = 32; + OutputType.SubFormat = KSDATAFORMAT_SUBTYPE_PCM; + break; case DevFmtFloat: OutputType.Format.wBitsPerSample = 32; OutputType.Samples.wValidBitsPerSample = 32; @@ -358,6 +366,8 @@ static HRESULT DoReset(ALCdevice *device) device->FmtType = DevFmtUByte; else if(OutputType.Format.wBitsPerSample == 16) device->FmtType = DevFmtShort; + else if(OutputType.Format.wBitsPerSample == 32) + device->FmtType = DevFmtInt; else { device->FmtType = DevFmtShort; |