aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/mixvoice.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-12-27 10:44:02 -0800
committerChris Robinson <[email protected]>2018-12-27 10:44:02 -0800
commit4dca2f2ee5ef488fbe05397de1ab3029e559cf61 (patch)
tree930224ac816f69b0ca0a7cd0c97e647d6e04da57 /Alc/mixvoice.cpp
parentbe85ab6f826a724105cef05e740b5013a1e6149e (diff)
Use a unique_ptr for the AsyncEvents ringbuffer
Diffstat (limited to 'Alc/mixvoice.cpp')
-rw-r--r--Alc/mixvoice.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/mixvoice.cpp b/Alc/mixvoice.cpp
index 48844219..53721201 100644
--- a/Alc/mixvoice.cpp
+++ b/Alc/mixvoice.cpp
@@ -736,11 +736,11 @@ ALboolean MixSource(ALvoice *voice, const ALuint SourceID, ALCcontext *Context,
ALbitfieldSOFT enabledevt{Context->EnabledEvts.load(std::memory_order_acquire)};
if(buffers_done > 0 && (enabledevt&EventType_BufferCompleted))
{
- RingBuffer *ring{Context->AsyncEvents};
- auto evt_data = ring->getWriteVector().first;
- if(evt_data.len > 0)
+ RingBuffer *ring{Context->AsyncEvents.get()};
+ auto evt_vec = ring->getWriteVector();
+ if(evt_vec.first.len > 0)
{
- AsyncEvent *evt{new (evt_data.buf) AsyncEvent{EventType_BufferCompleted}};
+ AsyncEvent *evt{new (evt_vec.first.buf) AsyncEvent{EventType_BufferCompleted}};
evt->u.bufcomp.id = SourceID;
evt->u.bufcomp.count = buffers_done;
ring->writeAdvance(1);