diff options
author | Chris Robinson <[email protected]> | 2023-05-08 17:22:24 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-05-08 17:22:24 -0700 |
commit | e1e375e5238282c36ab7dddf148461c4370de39d (patch) | |
tree | 68e1edf02a3d809e4a1d010b3d8bb5858d3ed121 /alc/alu.cpp | |
parent | d4cef1994324efed7040e5cb2bca82a33888a35f (diff) |
Send a debug message when disconnecting
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) |