From 6dec8c073664f03da566dd01f2f126c0fc145096 Mon Sep 17 00:00:00 2001 From: David Reid Date: Sat, 10 Jul 2021 18:45:31 +1000 Subject: [PATCH] Have ma_decoder_read_pcm_frames() return MA_AT_END. --- miniaudio.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/miniaudio.h b/miniaudio.h index 0fecb1c1..befa5428 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -50226,6 +50226,10 @@ MA_API ma_result ma_decoder_read_pcm_frames(ma_decoder* pDecoder, void* pFramesO *pFramesRead = totalFramesReadOut; } + if (totalFramesReadOut == 0) { + return MA_AT_END; + } + return result; }