summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRay <[email protected]>2020-01-15 11:22:15 +0100
committerRay <[email protected]>2020-01-15 11:22:15 +0100
commit9f699af138d4f6fc7e495b86a9f361159e9aef63 (patch)
tree18e9d292a043620cb57754b9b1d7866699ebf081
parent4525c897e242a0594c12afa11cf4633d3b97cb25 (diff)
parent019434a37e02aa3ae319d5c7254c97a8bae42227 (diff)
downloadraylib-9f699af138d4f6fc7e495b86a9f361159e9aef63.tar.gz
raylib-9f699af138d4f6fc7e495b86a9f361159e9aef63.zip
Merge branch 'master' of https://github.com/raysan5/raylib
-rw-r--r--src/raudio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/raudio.c b/src/raudio.c
index b94f0e65..9fde6e95 100644
--- a/src/raudio.c
+++ b/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)