diff options
| author | Ray <[email protected]> | 2020-01-15 11:22:15 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2020-01-15 11:22:15 +0100 |
| commit | 9f699af138d4f6fc7e495b86a9f361159e9aef63 (patch) | |
| tree | 18e9d292a043620cb57754b9b1d7866699ebf081 /src | |
| parent | 4525c897e242a0594c12afa11cf4633d3b97cb25 (diff) | |
| parent | 019434a37e02aa3ae319d5c7254c97a8bae42227 (diff) | |
| download | raylib-9f699af138d4f6fc7e495b86a9f361159e9aef63.tar.gz raylib-9f699af138d4f6fc7e495b86a9f361159e9aef63.zip | |
Merge branch 'master' of https://github.com/raysan5/raylib
Diffstat (limited to 'src')
| -rw-r--r-- | src/raudio.c | 6 |
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) |
