Commit 15298ad7 authored by David Reid's avatar David Reid

Fix documentation for ma_decoder_read_pcm_frames().

Public issue https://github.com/mackron/miniaudio/issues/385
parent 6353c2e6
......@@ -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.
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment