diff options
-rw-r--r-- | Alc/ringbuffer.cpp | 6 | ||||
-rw-r--r-- | OpenAL32/event.cpp | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/Alc/ringbuffer.cpp b/Alc/ringbuffer.cpp index 767db246..791fff63 100644 --- a/Alc/ringbuffer.cpp +++ b/Alc/ringbuffer.cpp @@ -192,7 +192,7 @@ void RingBuffer::writeAdvance(size_t cnt) noexcept } -ll_ringbuffer_data_pair RingBuffer::getWriteVector() const noexcept +ll_ringbuffer_data_pair RingBuffer::getReadVector() const noexcept { ll_ringbuffer_data_pair ret; @@ -205,7 +205,7 @@ ll_ringbuffer_data_pair RingBuffer::getWriteVector() const noexcept const size_t cnt2{r + free_cnt}; if(cnt2 > mSizeMask+1) { - /* Two part vector: the rest of the buffer after the current write ptr, + /* Two part vector: the rest of the buffer after the current read ptr, * plus some from the start of the buffer. */ ret.first.buf = const_cast<char*>(&mBuffer[r*mElemSize]); ret.first.len = mSizeMask+1 - r; @@ -224,7 +224,7 @@ ll_ringbuffer_data_pair RingBuffer::getWriteVector() const noexcept return ret; } -ll_ringbuffer_data_pair RingBuffer::getReadVector() const noexcept +ll_ringbuffer_data_pair RingBuffer::getWriteVector() const noexcept { ll_ringbuffer_data_pair ret; diff --git a/OpenAL32/event.cpp b/OpenAL32/event.cpp index f3474139..a2e3addd 100644 --- a/OpenAL32/event.cpp +++ b/OpenAL32/event.cpp @@ -37,14 +37,14 @@ static int EventThread(ALCcontext *context) * ringbuffer's read offset at the end of scope. */ const struct EventAutoDestructor { - AsyncEvent &evt; - RingBuffer *ring; + AsyncEvent &evt_; + RingBuffer *ring_; ~EventAutoDestructor() { - evt.~AsyncEvent(); - ring->readAdvance(1); + evt_.~AsyncEvent(); + ring_->readAdvance(1); } - } _{evt, context->AsyncEvents.get()}; + } _{evt, ring}; quitnow = evt.EnumType == EventType_KillThread; if(UNLIKELY(quitnow)) break; |