From 963580c2d503eab7c6d8f60a367498ff103bfa3e Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 8 Oct 2019 21:52:08 -0700 Subject: Never return null from CreateRingBuffer Allocation failure would already throw a bad_alloc anyway, now a size overflow throws an exception too. --- alc/backends/dsound.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'alc/backends/dsound.cpp') 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)) { -- cgit v1.2.3