From d51b056c510084dffb1dbddc2ddf0ee82863b81c Mon Sep 17 00:00:00 2001 From: Clownacy Date: Wed, 19 Jan 2022 18:38:27 +0000 Subject: [PATCH 1/3] Correct outdated variable name in documentation 'noPreZeroedOutputBuffer' was renamed to 'noPreSilencedOutputBuffer' in v0.11.0. --- miniaudio.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/miniaudio.h b/miniaudio.h index 5b414bf4..26e332b0 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -3611,8 +3611,9 @@ Some backends have some nuance details you may want to be aware of. WASAPI and Core Audio, however other backends such as PulseAudio may naturally support it, though not all have been tested. - The contents of the output buffer passed into the data callback will always be pre-initialized to - silence unless the `noPreZeroedOutputBuffer` config variable in `ma_device_config` is set to true, - in which case it'll be undefined which will require you to write something to the entire buffer. + silence unless the `noPreSilencedOutputBuffer` config variable in `ma_device_config` is set to + true, in which case it'll be undefined which will require you to write something to the entire + buffer. - By default miniaudio will automatically clip samples. This only applies when the playback sample format is configured as `ma_format_f32`. If you are doing clipping yourself, you can disable this overhead by setting `noClip` to true in the device config. From 38c814f52a34136bee37724fd8c8a22a2f3a8963 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Wed, 19 Jan 2022 19:07:40 +0000 Subject: [PATCH 2/3] Update some more documentation This time for example code showing 'ma_channel_converter_init' and 'ma_data_converter_init'. --- miniaudio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miniaudio.h b/miniaudio.h index 26e332b0..f90b9f84 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -2681,7 +2681,7 @@ initializing a simple channel converter which converts from mono to stereo. NULL, // Output channel map ma_channel_mix_mode_default); // The mixing algorithm to use when combining channels. - result = ma_channel_converter_init(&config, &converter); + result = ma_channel_converter_init(&config, NULL, &converter); if (result != MA_SUCCESS) { // Error. } @@ -2978,7 +2978,7 @@ object like this: ); ma_data_converter converter; - ma_result result = ma_data_converter_init(&config, &converter); + ma_result result = ma_data_converter_init(&config, NULL, &converter); if (result != MA_SUCCESS) { // An error occurred... } From 56e41a0fde20c32fa8b84128cfdde51d667ea758 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Wed, 19 Jan 2022 19:10:45 +0000 Subject: [PATCH 3/3] Update example 'ma_data_converter_uninit' call --- miniaudio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniaudio.h b/miniaudio.h index f90b9f84..c2deded8 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -3003,7 +3003,7 @@ Something like the following may be more suitable depending on your requirements Do the following to uninitialize the data converter: ```c - ma_data_converter_uninit(&converter); + ma_data_converter_uninit(&converter, NULL); ``` The following example shows how data can be processed