From 2730775e79d789a973a00f7b7de87aa7b57d6623 Mon Sep 17 00:00:00 2001 From: David Reid Date: Fri, 27 Oct 2023 17:05:56 +1000 Subject: [PATCH] Fix a documentation error. --- miniaudio.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/miniaudio.h b/miniaudio.h index 9ab2c15e..ac2da690 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -2675,9 +2675,16 @@ outputting any audio data. To output audio data, use `ma_encoder_write_pcm_frame example below: ```c - framesWritten = ma_encoder_write_pcm_frames(&encoder, pPCMFramesToWrite, framesToWrite); + ma_uint64 framesWritten; + result = ma_encoder_write_pcm_frames(&encoder, pPCMFramesToWrite, framesToWrite, &framesWritten); + if (result != MA_SUCCESS) { + ... handle error ... + } ``` +The `framesWritten` variable will contain the number of PCM frames that were actually written. This +is optionally and you can pass in `NULL` if you need this. + Encoders must be uninitialized with `ma_encoder_uninit()`.