diff options
Diffstat (limited to 'alc/alu.cpp')
-rw-r--r-- | alc/alu.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/alc/alu.cpp b/alc/alu.cpp index fc22febb..1157aca3 100644 --- a/alc/alu.cpp +++ b/alc/alu.cpp @@ -2178,16 +2178,13 @@ void DeviceBase::handleDisconnect(const char *msg, ...) for(ContextBase *ctx : *mContexts.load()) { - if(ctx->mEnabledEvts.load(std::memory_order_acquire).test(AsyncEvent::Disconnected)) + RingBuffer *ring{ctx->mAsyncEvents.get()}; + auto evt_data = ring->getWriteVector().first; + if(evt_data.len > 0) { - RingBuffer *ring{ctx->mAsyncEvents.get()}; - auto evt_data = ring->getWriteVector().first; - if(evt_data.len > 0) - { - al::construct_at(reinterpret_cast<AsyncEvent*>(evt_data.buf), evt); - ring->writeAdvance(1); - ctx->mEventSem.post(); - } + al::construct_at(reinterpret_cast<AsyncEvent*>(evt_data.buf), evt); + ring->writeAdvance(1); + ctx->mEventSem.post(); } if(!ctx->mStopVoicesOnDisconnect) |