mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-21 15:56:58 +02:00
Don't return MA_AT_END from ring buffers.
There is no notion of an "end" in a ring buffer. Also, this result is returned when the operation completed successfully which makes a result code other than MA_SUCCESS confusing.
This commit is contained in:
+2
-10
@@ -56592,11 +56592,7 @@ MA_API ma_result ma_rb_commit_read(ma_rb* pRB, size_t sizeInBytes)
|
||||
|
||||
ma_atomic_exchange_32(&pRB->encodedReadOffset, ma_rb__construct_offset(newReadOffsetLoopFlag, newReadOffsetInBytes));
|
||||
|
||||
if (ma_rb_pointer_distance(pRB) == 0) {
|
||||
return MA_AT_END;
|
||||
} else {
|
||||
return MA_SUCCESS;
|
||||
}
|
||||
return MA_SUCCESS;
|
||||
}
|
||||
|
||||
MA_API ma_result ma_rb_acquire_write(ma_rb* pRB, size_t* pSizeInBytes, void** ppBufferOut)
|
||||
@@ -56678,11 +56674,7 @@ MA_API ma_result ma_rb_commit_write(ma_rb* pRB, size_t sizeInBytes)
|
||||
|
||||
ma_atomic_exchange_32(&pRB->encodedWriteOffset, ma_rb__construct_offset(newWriteOffsetLoopFlag, newWriteOffsetInBytes));
|
||||
|
||||
if (ma_rb_pointer_distance(pRB) == 0) {
|
||||
return MA_AT_END;
|
||||
} else {
|
||||
return MA_SUCCESS;
|
||||
}
|
||||
return MA_SUCCESS;
|
||||
}
|
||||
|
||||
MA_API ma_result ma_rb_seek_read(ma_rb* pRB, size_t offsetInBytes)
|
||||
|
||||
Reference in New Issue
Block a user