mirror of
https://github.com/raysan5/raylib.git
synced 2026-02-04 13:19:17 -05:00
Added comment about buffer refill issue on looping #2228
This commit is contained in:
@ -1745,6 +1745,9 @@ void UpdateMusicStream(Music music)
|
|||||||
|
|
||||||
while (IsAudioStreamProcessed(music.stream))
|
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;
|
if (framesLeft >= subBufferSizeInFrames) frameCountToStream = subBufferSizeInFrames;
|
||||||
else frameCountToStream = framesLeft;
|
else frameCountToStream = framesLeft;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user