From 785f52aa29d49026f2669de4eed3c7041b9e876f Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 17 Jun 2012 04:13:01 -0700 Subject: [PATCH] Only try float32 with DSound when specifically requested Some hardware drivers seem to have a bug where a buffer descriptor with a 32-bit float sample type ends up creating a non-float32 buffer. --- Alc/backends/dsound.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Alc/backends/dsound.c b/Alc/backends/dsound.c index 919160e9..a80d2a99 100644 --- a/Alc/backends/dsound.c +++ b/Alc/backends/dsound.c @@ -433,6 +433,10 @@ static ALCboolean DSoundResetPlayback(ALCdevice *device) case DevFmtByte: device->FmtType = DevFmtUByte; break; + case DevFmtFloat: + if((device->Flags&DEVICE_SAMPLE_TYPE_REQUEST)) + break; + /* fall-through */ case DevFmtUShort: device->FmtType = DevFmtShort; break; @@ -442,7 +446,6 @@ static ALCboolean DSoundResetPlayback(ALCdevice *device) case DevFmtUByte: case DevFmtShort: case DevFmtInt: - case DevFmtFloat: break; } -- 2.11.4.GIT