mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 08:44:04 +02:00
Fix documentation for ma_decoder_read_pcm_frames().
Public issue https://github.com/mackron/miniaudio/issues/385
This commit is contained in:
+4
-4
@@ -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.
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user