diff options
author | Chris Robinson <[email protected]> | 2012-02-26 22:03:27 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-02-26 22:03:27 -0800 |
commit | 5e625c9a687b0d83e3328c9d8421d0612b3101f2 (patch) | |
tree | 15e9cec938d308e33bccb9a921ca5f443fe5ec84 /Alc/backends/dsound.c | |
parent | da4408835d5ee10dce7e12bb36aeb045225b8d07 (diff) |
Watch for unsupported sample types for dsound capture
Diffstat (limited to 'Alc/backends/dsound.c')
-rw-r--r-- | Alc/backends/dsound.c | 15 |
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) |