Fix documentation for ma_decoder_read_pcm_frames().

Public issue https://github.com/mackron/miniaudio/issues/385
This commit is contained in:
David Reid
2021-12-30 05:42:57 +10:00
parent 6353c2e69e
commit 15298ad77f
+4 -4
View File
@@ -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 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. 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 Data is read from the decoder as PCM frames. This will output 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 read. If this is less than the requested number of PCM frames it means you've reached the end. The
the end: return value will be `MA_AT_END` if no samples have been read and the end has been reached.
```c ```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) { if (framesRead < framesToRead) {
// Reached the end. // Reached the end.
} }