aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-06-17 04:13:01 -0700
committerChris Robinson <[email protected]>2012-06-17 04:13:01 -0700
commit785f52aa29d49026f2669de4eed3c7041b9e876f (patch)
tree2ea8cc5ea6d9c56bab6a98efff1603a9ab90fa3d
parent051195a99152e35e089a2477b4a7f66a1aadf6da (diff)
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.
-rw-r--r--Alc/backends/dsound.c5
1 files changed, 4 insertions, 1 deletions
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;
}