diff options
author | Chris Robinson <[email protected]> | 2011-03-12 22:52:33 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-03-12 22:52:33 -0800 |
commit | 208912ceac4c6a695d805abcd723734a87479a30 (patch) | |
tree | 46328a384891d1671dd99f601ba58505c2feb2bc | |
parent | 89c253ce41b9eddd86aaecb31ce5d9ed3f1eb5e8 (diff) |
Fix DSound floating-point sample assumptions
-rw-r--r-- | Alc/dsound.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Alc/dsound.c b/Alc/dsound.c index 26e6d46f..6dfbe3d6 100644 --- a/Alc/dsound.c +++ b/Alc/dsound.c @@ -432,12 +432,12 @@ static ALCboolean DSoundResetPlayback(ALCdevice *device) OutputType.Format.cbSize = 0; } - if(OutputType.Format.nChannels > 2 || OutputType.Format.wBitsPerSample > 16) + if(OutputType.Format.nChannels > 2 || device->FmtType == DevFmtFloat) { OutputType.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE; OutputType.Samples.wValidBitsPerSample = OutputType.Format.wBitsPerSample; OutputType.Format.cbSize = 22; - if(OutputType.Format.wBitsPerSample == 32) + if(device->FmtType == DevFmtFloat) OutputType.SubFormat = KSDATAFORMAT_SUBTYPE_IEEE_FLOAT; else OutputType.SubFormat = KSDATAFORMAT_SUBTYPE_PCM; |