summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2022-07-10 21:39:13 +0200
committerRay <[email protected]>2022-07-10 21:39:13 +0200
commit22455002454d416acb8998b0658014ac02a01227 (patch)
treea6d0f3c59525636a8ea649de28a9d74bb1c17682 /src
parent066bd5be87ff259ea55b2a78953f2f929bfc5ad0 (diff)
downloadraylib-22455002454d416acb8998b0658014ac02a01227.tar.gz
raylib-22455002454d416acb8998b0658014ac02a01227.zip
Added comment about buffer refill issue on looping #2228
Diffstat (limited to 'src')
-rw-r--r--src/raudio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/raudio.c b/src/raudio.c
index c4824019..4186ca60 100644
--- a/src/raudio.c
+++ b/src/raudio.c
@@ -1745,6 +1745,9 @@ void UpdateMusicStream(Music music)
while (IsAudioStreamProcessed(music.stream))
{
+ // WARNING: If audio needs to loop but the frames left are less than the actual size of buffer to fill,
+ // the buffer is only partially filled and no refill is done until next frame call, generating a silence
+ // TODO: Possible solution: In case of music loop, fill frames left + frames from start to fill the buffer to process
if (framesLeft >= subBufferSizeInFrames) frameCountToStream = subBufferSizeInFrames;
else frameCountToStream = framesLeft;