aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/dsound.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-02-26 22:03:27 -0800
committerChris Robinson <[email protected]>2012-02-26 22:03:27 -0800
commit5e625c9a687b0d83e3328c9d8421d0612b3101f2 (patch)
tree15e9cec938d308e33bccb9a921ca5f443fe5ec84 /Alc/backends/dsound.c
parentda4408835d5ee10dce7e12bb36aeb045225b8d07 (diff)
Watch for unsupported sample types for dsound capture
Diffstat (limited to 'Alc/backends/dsound.c')
-rw-r--r--Alc/backends/dsound.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/Alc/backends/dsound.c b/Alc/backends/dsound.c
index 851dd9e2..f18d8dd5 100644
--- a/Alc/backends/dsound.c
+++ b/Alc/backends/dsound.c
@@ -650,6 +650,21 @@ static ALCenum DSoundOpenCapture(ALCdevice *device, const ALCchar *deviceName)
return ALC_INVALID_VALUE;
}
+ switch(device->FmtType)
+ {
+ case DevFmtByte:
+ case DevFmtUShort:
+ case DevFmtUInt:
+ WARN("%s capture samples not supported\n", DevFmtTypeString(device->FmtType));
+ return ALC_INVALID_ENUM;
+
+ case DevFmtUByte:
+ case DevFmtShort:
+ case DevFmtInt:
+ case DevFmtFloat:
+ break;
+ }
+
//Initialise requested device
pData = calloc(1, sizeof(DSoundCaptureData));
if(!pData)