From 515edc3deea8ba2661cb86571410fdd9a8eae158 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 27 Dec 2018 15:05:12 -0800 Subject: Fix ring buffer vector methods --- Alc/ringbuffer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Alc/ringbuffer.cpp') 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(&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; -- cgit v1.2.3