mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
Update documentation.
This commit is contained in:
@@ -254,7 +254,7 @@ a.doc-navigation-l4 {
|
||||
<p>
|
||||
To use miniaudio, just include "miniaudio.h" like any other header and add "miniaudio.c" to your
|
||||
source tree. If you don't want to add it to your source tree you can compile and link to it like
|
||||
any other library. Note that ABI compatiblity is not guaranteed between versions, even with bug
|
||||
any other library. Note that ABI compatibility is not guaranteed between versions, even with bug
|
||||
fix releases, so take care if compiling as a shared object.
|
||||
</p>
|
||||
<p>
|
||||
@@ -666,7 +666,7 @@ this manual.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
The code below shows how you can initialize an engine using it's default configuration.
|
||||
The code below shows how you can initialize an engine using its default configuration.
|
||||
</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; overflow-y:hidden;">
|
||||
<span style="color:#0099cc">ma_result</span> result;
|
||||
@@ -764,7 +764,7 @@ Sounds are not started by default. Start a sound with <span style="font-family:m
|
||||
<span style="font-family:monospace;">ma_sound_stop()</span>. When a sound is stopped, it is not rewound to the start. Use
|
||||
<span style="font-family:monospace;">ma_sound_seek_to_pcm_frame(&sound, 0)</span> to seek back to the start of a sound. By default, starting
|
||||
and stopping sounds happens immediately, but sometimes it might be convenient to schedule the sound
|
||||
the be started and/or stopped at a specific time. This can be done with the following functions:
|
||||
to be started and/or stopped at a specific time. This can be done with the following functions:
|
||||
</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; overflow-y:hidden;">
|
||||
ma_sound_set_start_time_in_pcm_frames()
|
||||
@@ -936,7 +936,7 @@ You cannot use <span style="font-family:monospace;">-std=c*</span> compiler flag
|
||||
</p>
|
||||
<p>
|
||||
|
||||
You can enable the use of AudioWorkets by defining <span style="font-family:monospace;">MA_ENABLE_AUDIO_WORKLETS</span> and then compiling
|
||||
You can enable the use of AudioWorklets by defining <span style="font-family:monospace;">MA_ENABLE_AUDIO_WORKLETS</span> and then compiling
|
||||
with the following options:
|
||||
</p>
|
||||
<ul style="overflow:hidden;">
|
||||
@@ -1715,7 +1715,7 @@ result = ma_data_source_set_range_in_pcm_frames(pDataSource, rangeBegInFrames, r
|
||||
|
||||
This is useful if you have a sound bank where many sounds are stored in the same file and you want
|
||||
the data source to only play one of those sub-sounds. Note that once the range is set, everything
|
||||
that takes a position, such as cursors and loop points, should always be relatvie to the start of
|
||||
that takes a position, such as cursors and loop points, should always be relative to the start of
|
||||
the range. When the range is set, any previously defined loop point will be reset.
|
||||
</p>
|
||||
<p>
|
||||
@@ -1725,7 +1725,7 @@ they reach the end of the data source, but if you need to loop at a specific loc
|
||||
the following:
|
||||
</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; overflow-y:hidden;">
|
||||
result = ma_data_set_loop_point_in_pcm_frames(pDataSource, loopBegInFrames, loopEndInFrames);
|
||||
result = ma_data_source_set_loop_point_in_pcm_frames(pDataSource, loopBegInFrames, loopEndInFrames);
|
||||
<span style="color:#0033ff">if</span> (result != MA_SUCCESS) {
|
||||
<span style="color:#0033ff">return</span> result; <span style="color:#009900">// Failed to set the loop point.</span>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user