aboutsummaryrefslogtreecommitdiffstats
path: root/core/voice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/voice.cpp')
-rw-r--r--core/voice.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/voice.cpp b/core/voice.cpp
index 3e78b176..65986cd1 100644
--- a/core/voice.cpp
+++ b/core/voice.cpp
@@ -226,8 +226,7 @@ void SendSourceStoppedEvent(ContextBase *context, uint id)
auto evt_vec = ring->getWriteVector();
if(evt_vec.first.len < 1) return;
- AsyncSourceStateEvent &evt = InitAsyncEvent<AsyncSourceStateEvent>(
- reinterpret_cast<AsyncEvent*>(evt_vec.first.buf));
+ auto &evt = InitAsyncEvent<AsyncSourceStateEvent>(evt_vec.first.buf);
evt.mId = id;
evt.mState = AsyncSrcState::Stop;
@@ -1151,8 +1150,7 @@ void Voice::mix(const State vstate, ContextBase *Context, const nanoseconds devi
auto evt_vec = ring->getWriteVector();
if(evt_vec.first.len > 0)
{
- AsyncBufferCompleteEvent &evt = InitAsyncEvent<AsyncBufferCompleteEvent>(
- reinterpret_cast<AsyncEvent*>(evt_vec.first.buf));
+ auto &evt = InitAsyncEvent<AsyncBufferCompleteEvent>(evt_vec.first.buf);
evt.mId = SourceID;
evt.mCount = buffers_done;
ring->writeAdvance(1);