From 15298ad77fc5a99666f26f51ce17c8fa82fa2f87 Mon Sep 17 00:00:00 2001 From: David Reid Date: Thu, 30 Dec 2021 05:42:57 +1000 Subject: [PATCH] Fix documentation for ma_decoder_read_pcm_frames(). Public issue https://github.com/mackron/miniaudio/issues/385 --- miniaudio.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/miniaudio.h b/miniaudio.h index c778d5e5..f11c1567 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -2448,12 +2448,12 @@ count, sample rate and channel map: When passing in `NULL` for decoder config in `ma_decoder_init*()`, the output format will be the same as that defined by the decoding backend. -Data is read from the decoder as PCM frames. This will return the number of PCM frames actually -read. If the return value is less than the requested number of PCM frames it means you've reached -the end: +Data is read from the decoder as PCM frames. This will output the number of PCM frames actually +read. If this is less than the requested number of PCM frames it means you've reached the end. The +return value will be `MA_AT_END` if no samples have been read and the end has been reached. ```c - ma_uint64 framesRead = ma_decoder_read_pcm_frames(pDecoder, pFrames, framesToRead); + ma_uint64 framesRead = ma_decoder_read_pcm_frames(pDecoder, pFrames, framesToRead, &framesRead); if (framesRead < framesToRead) { // Reached the end. }