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/portaudio.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/portaudio.cpp')
-rw-r--r-- | alc/backends/portaudio.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/alc/backends/portaudio.cpp b/alc/backends/portaudio.cpp index 7c60d2bb..f50f1f16 100644 --- a/alc/backends/portaudio.cpp +++ b/alc/backends/portaudio.cpp @@ -286,7 +286,6 @@ void PortCapture::open(const ALCchar *name) ALuint frame_size{mDevice->frameSizeFromFmt()}; mRing = CreateRingBuffer(samples, frame_size, false); - if(!mRing) throw al::backend_exception{ALC_INVALID_VALUE, "Failed to create ring buffer"}; auto devidopt = ConfigValueInt(nullptr, "port", "capture"); if(devidopt && *devidopt >= 0) mParams.device = *devidopt; |