From ec5ce8c7feed10f590612b2cfa2162a9ae6790f1 Mon Sep 17 00:00:00 2001 From: Ivan Ugryumov Date: Mon, 28 Apr 2025 13:45:19 +0300 Subject: [PATCH] Update raudio.c --- src/raudio.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/raudio.c b/src/raudio.c index 66d337567..dd8f4a255 100644 --- a/src/raudio.c +++ b/src/raudio.c @@ -604,6 +604,7 @@ AudioBuffer *LoadAudioBuffer(ma_format format, ma_uint32 channels, ma_uint32 sam audioBuffer->usage = usage; audioBuffer->frameCursorPos = 0; + audioBuffer->framesProcessed = 0; audioBuffer->sizeInFrames = sizeInFrames; // Buffers should be marked as processed by default so that a call to @@ -650,6 +651,9 @@ void PlayAudioBuffer(AudioBuffer *buffer) buffer->playing = true; buffer->paused = false; buffer->frameCursorPos = 0; + buffer->framesProcessed = 0; + buffer->isSubBufferProcessed[0] = true; + buffer->isSubBufferProcessed[1] = true; ma_mutex_unlock(&AUDIO.System.lock); } }