From 208912ceac4c6a695d805abcd723734a87479a30 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 12 Mar 2011 22:52:33 -0800 Subject: Fix DSound floating-point sample assumptions --- Alc/dsound.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Alc') 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; -- cgit v1.2.3