diff options
author | Chris Robinson <[email protected]> | 2018-12-27 15:05:12 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-12-27 15:05:12 -0800 |
commit | 515edc3deea8ba2661cb86571410fdd9a8eae158 (patch) | |
tree | f6226ab416907070bf8d79ac637ac121ee5c4ded /Alc | |
parent | f2c2b7c5383ddd999b56f28730258f270b0d2576 (diff) |
Fix ring buffer vector methods
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ringbuffer.cpp | 6 |
1 files changed, 3 insertions, 3 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; |