Skip to content

Commit

Permalink
Fix a documentation error.
Browse files Browse the repository at this point in the history
  • Loading branch information
mackron committed Oct 27, 2023
1 parent 1d17b09 commit 2730775
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion miniaudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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()`.


Expand Down

0 comments on commit 2730775

Please sign in to comment.