浏览代码

Added comment about buffer refill issue on looping #2228

pull/2574/head
Ray 3 年前
父节点
当前提交
2245500245
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. +3
    -0
      src/raudio.c

+ 3
- 0
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;

正在加载...
取消
保存