Fix streaming data_ptr locked at end_ring_buffer, fix
@@ -162,7 +162,7 @@ uint16_t Stream_GetAvailableSampleNBUntilEndBuffer(streaming_channel_t *stream)
uint16_t Stream_AddAvailableSampleNB(streaming_channel_t *stream, uint16_t size)
{
LUOS_ASSERT((uint32_t)(Stream_GetAvailableSampleNB(stream) + size) < (uint32_t)(stream->end_ring_buffer - stream->ring_buffer));
- if (((size * stream->data_size) + stream->data_ptr) > stream->end_ring_buffer)
+ if (((size * stream->data_size) + stream->data_ptr) >= stream->end_ring_buffer)
{
uint16_t chunk1 = stream->end_ring_buffer - stream->data_ptr;
uint16_t chunk2 = (size * stream->data_size) - chunk1;
