Browse Source

Merge branch 'master' of https://github.com/raysan5/raylib

Ray 5 năm trước cách đây
mục cha
commit
9f699af138
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      src/raudio.c

+ 6 - 0
src/raudio.c

@@ -324,6 +324,12 @@ static void OnSendAudioDataToDevice(ma_device *pDevice, void *pFramesOut, const
                         framesToRead -= framesJustRead;
                         framesRead += framesJustRead;
                     }
+                    
+                    if (!audioBuffer->playing)
+                    {
+                        framesRead = frameCount;
+                        break;
+                    }
 
                     // If we weren't able to read all the frames we requested, break
                     if (framesJustRead < framesToReadRightNow)