mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-21 15:56:58 +02:00
Update documentation.
This commit is contained in:
@@ -444,7 +444,7 @@ The <span style="font-family:monospace;">onInitFile</span>, <span style="font-fa
|
|||||||
<span style="color:#0033ff">return</span>;
|
<span style="color:#0033ff">return</span>;
|
||||||
}
|
}
|
||||||
|
|
||||||
ma_data_source_read_pcm_frames(pDataSource, pOutput, frameCount, NULL, MA_TRUE);
|
ma_data_source_read_pcm_frames(pDataSource, pOutput, frameCount, NULL);
|
||||||
|
|
||||||
(<span style="color:#0033ff">void</span>)pInput;
|
(<span style="color:#0033ff">void</span>)pInput;
|
||||||
}
|
}
|
||||||
@@ -489,6 +489,8 @@ The <span style="font-family:monospace;">onInitFile</span>, <span style="font-fa
|
|||||||
<span style="color:#0033ff">return</span> -1;
|
<span style="color:#0033ff">return</span> -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_data_source_set_looping(&decoder, MA_TRUE);
|
||||||
|
|
||||||
|
|
||||||
<span style="color:#009900">/* Initialize the device. */</span>
|
<span style="color:#009900">/* Initialize the device. */</span>
|
||||||
result = ma_data_source_get_data_format(&decoder, &format, &channels, &sampleRate, NULL, 0);
|
result = ma_data_source_get_data_format(&decoder, &format, &channels, &sampleRate, NULL, 0);
|
||||||
|
|||||||
@@ -4383,7 +4383,7 @@ initializing a simple channel converter which converts from mono to stereo.
|
|||||||
NULL, <span style="color:#009900">// Output channel map</span>
|
NULL, <span style="color:#009900">// Output channel map</span>
|
||||||
ma_channel_mix_mode_default); <span style="color:#009900">// The mixing algorithm to use when combining channels.</span>
|
ma_channel_mix_mode_default); <span style="color:#009900">// The mixing algorithm to use when combining channels.</span>
|
||||||
|
|
||||||
result = ma_channel_converter_init(&config, &converter);
|
result = ma_channel_converter_init(&config, NULL, &converter);
|
||||||
<span style="color:#0033ff">if</span> (result != MA_SUCCESS) {
|
<span style="color:#0033ff">if</span> (result != MA_SUCCESS) {
|
||||||
<span style="color:#009900">// Error.</span>
|
<span style="color:#009900">// Error.</span>
|
||||||
}
|
}
|
||||||
@@ -4973,7 +4973,7 @@ object like this:
|
|||||||
);
|
);
|
||||||
|
|
||||||
<span style="color:#0099cc">ma_data_converter</span> converter;
|
<span style="color:#0099cc">ma_data_converter</span> converter;
|
||||||
<span style="color:#0099cc">ma_result</span> result = ma_data_converter_init(&config, &converter);
|
<span style="color:#0099cc">ma_result</span> result = ma_data_converter_init(&config, NULL, &converter);
|
||||||
<span style="color:#0033ff">if</span> (result != MA_SUCCESS) {
|
<span style="color:#0033ff">if</span> (result != MA_SUCCESS) {
|
||||||
<span style="color:#009900">// An error occurred...</span>
|
<span style="color:#009900">// An error occurred...</span>
|
||||||
}
|
}
|
||||||
@@ -5004,7 +5004,7 @@ Do the following to uninitialize the data converter:
|
|||||||
|
|
||||||
</p>
|
</p>
|
||||||
<div style="font-family:monospace; border:solid 1px #003800; border-left:solid 0.5em #003800; margin:1em 0em; width:100%;"><pre style="margin:0.5em 1em; padding:0; line-height:125%; overflow-x:auto;">
|
<div style="font-family:monospace; border:solid 1px #003800; border-left:solid 0.5em #003800; margin:1em 0em; width:100%;"><pre style="margin:0.5em 1em; padding:0; line-height:125%; overflow-x:auto;">
|
||||||
ma_data_converter_uninit(&converter);
|
ma_data_converter_uninit(&converter, NULL);
|
||||||
</pre></div><p>
|
</pre></div><p>
|
||||||
|
|
||||||
The following example shows how data can be processed
|
The following example shows how data can be processed
|
||||||
@@ -6147,8 +6147,9 @@ Automatic stream routing is enabled on a per-backend basis. Support is explicitl
|
|||||||
not all have been tested.</li>
|
not all have been tested.</li>
|
||||||
<li>
|
<li>
|
||||||
The contents of the output buffer passed into the data callback will always be pre-initialized to
|
The contents of the output buffer passed into the data callback will always be pre-initialized to
|
||||||
silence unless the <span style="font-family:monospace;">noPreZeroedOutputBuffer</span> config variable in <span style="font-family:monospace;">ma_device_config</span> is set to true,
|
silence unless the <span style="font-family:monospace;">noPreSilencedOutputBuffer</span> config variable in <span style="font-family:monospace;">ma_device_config</span> is set to
|
||||||
in which case it'll be undefined which will require you to write something to the entire buffer.</li>
|
true, in which case it'll be undefined which will require you to write something to the entire
|
||||||
|
buffer.</li>
|
||||||
<li>
|
<li>
|
||||||
By default miniaudio will automatically clip samples. This only applies when the playback sample
|
By default miniaudio will automatically clip samples. This only applies when the playback sample
|
||||||
format is configured as <span style="font-family:monospace;">ma_format_f32</span>. If you are doing clipping yourself, you can disable this
|
format is configured as <span style="font-family:monospace;">ma_format_f32</span>. If you are doing clipping yourself, you can disable this
|
||||||
|
|||||||
Reference in New Issue
Block a user