diff options
author | Chris Robinson <[email protected]> | 2018-12-29 02:16:16 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-12-29 02:16:16 -0800 |
commit | 71a4d6db6f88cbb735cd959b3dd16d83a27474cf (patch) | |
tree | 4aff47e22dc5c8486c7229e23848edb34cc11ada /Alc/alc.cpp | |
parent | 3c637d5fd70e7bdb5dfc79c515359cba3eb0c9af (diff) |
Return a unique_ptr for the backend
Diffstat (limited to 'Alc/alc.cpp')
-rw-r--r-- | Alc/alc.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp index c625fd20..517e98d3 100644 --- a/Alc/alc.cpp +++ b/Alc/alc.cpp @@ -2203,7 +2203,6 @@ ALCdevice_struct::~ALCdevice_struct() { TRACE("%p\n", this); - delete Backend; Backend = nullptr; size_t count{std::accumulate(BufferList.cbegin(), BufferList.cend(), size_t{0u}, @@ -4037,7 +4036,7 @@ ALC_API void ALC_APIENTRY alcCaptureSamples(ALCdevice *device, ALCvoid *buffer, ALCenum err{ALC_INVALID_VALUE}; { std::lock_guard<std::mutex> _{dev->BackendLock}; - BackendBase *backend{dev->Backend}; + BackendBase *backend{dev->Backend.get()}; if(samples >= 0 && backend->availableSamples() >= (ALCuint)samples) err = backend->captureSamples(buffer, samples); } |