diff options
author | Chris Robinson <[email protected]> | 2019-10-08 21:52:08 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-10-08 21:55:03 -0700 |
commit | 963580c2d503eab7c6d8f60a367498ff103bfa3e (patch) | |
tree | ca30803987383fd8bbf413ee7fdd33898c97f2da /alc/backends/dsound.cpp | |
parent | 7726a06d26e59dc6a8e109af2e268de878c4f606 (diff) |
Never return null from CreateRingBuffer
Allocation failure would already throw a bad_alloc anyway, now a size overflow
throws an exception too.
Diffstat (limited to 'alc/backends/dsound.cpp')
-rw-r--r-- | alc/backends/dsound.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/alc/backends/dsound.cpp b/alc/backends/dsound.cpp index 005c9584..b74f2d3e 100644 --- a/alc/backends/dsound.cpp +++ b/alc/backends/dsound.cpp @@ -743,10 +743,7 @@ void DSoundCapture::open(const ALCchar *name) if(SUCCEEDED(hr)) mDSC->CreateCaptureBuffer(&DSCBDescription, &mDSCbuffer, nullptr); if(SUCCEEDED(hr)) - { mRing = CreateRingBuffer(mDevice->BufferSize, InputType.Format.nBlockAlign, false); - if(!mRing) hr = DSERR_OUTOFMEMORY; - } if(FAILED(hr)) { |