mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 00:34:03 +02:00
Remove vertical scroll bars from code sections.
This commit is contained in:
@@ -281,7 +281,7 @@ remaining callbacks if it is successfully initialized.
|
||||
Custom backends are identified with the <span style="font-family:monospace;">ma_backend_custom</span> backend type. For the purpose of demonstration, this example only uses the
|
||||
<span style="font-family:monospace;">ma_backend_custom</span> backend type because otherwise the built-in backends would always get chosen first and none of the code for the custom
|
||||
backends would actually get hit. By default, the <span style="font-family:monospace;">ma_backend_custom</span> backend is the lowest priority backend, except for <span style="font-family:monospace;">ma_backend_null</span>.</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; overflow-y:hidden;">
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../miniaudio.c"</span>
|
||||
|
||||
<span style="color:#666666">#ifdef</span> __EMSCRIPTEN__
|
||||
|
||||
@@ -274,7 +274,7 @@ The custom decoding data sources (<span style="font-family:monospace;">ma_libvor
|
||||
the decoder via the decoder config (<span style="font-family:monospace;">ma_decoder_config</span>). You need to implement a vtable for each
|
||||
of your custom decoders. See <span style="font-family:monospace;">ma_decoding_backend_vtable</span> for the functions you need to implement.
|
||||
The <span style="font-family:monospace;">onInitFile</span>, <span style="font-family:monospace;">onInitFileW</span> and <span style="font-family:monospace;">onInitMemory</span> functions are optional.</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; overflow-y:hidden;">
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../miniaudio.c"</span>
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../extras/decoders/libvorbis/miniaudio_libvorbis.c"</span>
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../extras/decoders/libopus/miniaudio_libopus.c"</span>
|
||||
|
||||
@@ -257,7 +257,7 @@ Demonstrates how to implement a custom decoder and use it with the high level AP
|
||||
This is the same as the custom_decoder example, only it's used with the high level engine API
|
||||
rather than the low level decoding API. You can use this to add support for Opus to your games, for
|
||||
example (via libopus).</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; overflow-y:hidden;">
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../miniaudio.c"</span>
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../extras/decoders/libvorbis/miniaudio_libvorbis.c"</span>
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../extras/decoders/libopus/miniaudio_libopus.c"</span>
|
||||
|
||||
@@ -283,7 +283,7 @@ consistently read from the head data source this state will become inconsistent
|
||||
work correctly. When using a chain, this pointer needs to be reset if you need to play the
|
||||
chain again from the start:
|
||||
</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; overflow-y:hidden;">
|
||||
ma_data_source_set_current(&headDataSource, &headDataSource);
|
||||
ma_data_source_seek_to_pcm_frame(&headDataSource, 0);
|
||||
</pre></div><p>
|
||||
@@ -292,7 +292,7 @@ The code above is setting the "current" data source in the chain to th
|
||||
starting the chain from the start again. It is also seeking the head data source back to the start
|
||||
so that playback starts from the start as expected. You do not need to seek non-head items back to
|
||||
the start as miniaudio will do that for you internally.</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; overflow-y:hidden;">
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../miniaudio.c"</span>
|
||||
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300"><stdio.h></span>
|
||||
|
||||
@@ -258,7 +258,7 @@ This example applies a vocoder effect to the input stream before outputting it.
|
||||
called <span style="font-family:monospace;">ma_vocoder_node</span> is used to achieve the effect which can be found in the extras folder in
|
||||
the miniaudio repository. The vocoder node uses <a href="https://github.com/blastbay/voclib">https://github.com/blastbay/voclib</a> to achieve the
|
||||
effect.</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; overflow-y:hidden;">
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../miniaudio.c"</span>
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../extras/nodes/ma_vocoder_node/ma_vocoder_node.c"</span>
|
||||
|
||||
|
||||
@@ -275,7 +275,7 @@ This example will play the sound that's passed in on the command line.
|
||||
Using a shared resource manager, as we do in this example, is useful for when you want to user
|
||||
multiple engines so that you can output to multiple playback devices simultaneoulys. An example
|
||||
might be a local co-op multiplayer game where each player has their own headphones.</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; overflow-y:hidden;">
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../miniaudio.c"</span>
|
||||
|
||||
<span style="color:#666666">#define</span> MAX_DEVICES 2
|
||||
|
||||
@@ -269,7 +269,7 @@ sound's output into the effect's input. See the Node Graph example for h
|
||||
This example is playing only a single sound at a time which means only a single <span style="font-family:monospace;">ma_sound</span> object
|
||||
it being used. If you want to play multiple sounds at the same time, even if they're for the same
|
||||
sound file, you need multiple <span style="font-family:monospace;">ma_sound</span> objects.</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; overflow-y:hidden;">
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../miniaudio.c"</span>
|
||||
|
||||
<span style="color:#666666">#define</span> DELAY_IN_SECONDS 0.2f
|
||||
|
||||
@@ -255,7 +255,7 @@ This example demonstrates how to initialize an audio engine and play a sound.
|
||||
<p>
|
||||
|
||||
This will play the sound specified on the command line.</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; overflow-y:hidden;">
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../miniaudio.c"</span>
|
||||
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300"><stdio.h></span>
|
||||
|
||||
@@ -262,7 +262,7 @@ audio output instead of miniaudio.
|
||||
|
||||
This example will load the sound specified on the command line and rotate it around the listener's
|
||||
head.</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; overflow-y:hidden;">
|
||||
<span style="color:#666666">#define</span> MA_NO_DEVICE_IO <span style="color:#009900">/* <-- Disables the <span style="font-family:monospace;">ma_device</span> API. We don't need that in this example since SDL will be doing that part for us. */</span>
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../miniaudio.c"</span>
|
||||
|
||||
|
||||
@@ -270,7 +270,7 @@ consistent, you must set the period size in the engine config to be consistent w
|
||||
you specify in your IPLAudioSettings object. If for some reason you want the period size of the
|
||||
engine to be different to that of your Steam Audio configuration, you'll need to implement a sort
|
||||
of buffering solution to your node.</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; overflow-y:hidden;">
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../miniaudio.c"</span>
|
||||
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300"><stdint.h></span> <span style="color:#009900">/* Required for uint32_t which is used by STEAMAUDIO_VERSION, and a random use of uint8_t. If there's a Steam Audio maintainer reading this, that needs to be fixed to use IPLuint32 and IPLuint8. */</span>
|
||||
|
||||
@@ -271,7 +271,7 @@ A more robust example would probably not want to use a ring buffer directly as t
|
||||
Instead you would probably want to do a custom data source that handles underruns and overruns of
|
||||
the ring buffer and deals with desyncs between capture and playback. In the future this example
|
||||
may be updated to make use of a more advanced data source that handles all of this.</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; overflow-y:hidden;">
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../miniaudio.c"</span>
|
||||
|
||||
<span style="color:#0033ff">static</span> <span style="color:#0099cc">ma_pcm_rb</span> rb;
|
||||
|
||||
@@ -280,7 +280,7 @@ node graph.
|
||||
|
||||
This example will be using the following node graph set up:
|
||||
</p>
|
||||
<div style="font-family:monospace; margin:1em 0em;"><pre style="margin:0.5em 1em; padding:0; line-height:125%; overflow-x:auto;">
|
||||
<div style="font-family:monospace; margin:1em 0em;"><pre style="margin:0.5em 1em; padding:0; line-height:125%; overflow-x:auto; overflow-y:hidden;">
|
||||
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Data flows left to right >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
|
||||
+---------------+ +-----------------+
|
||||
@@ -317,7 +317,7 @@ pass and echo effects so that one of them becomes more obvious than the other.
|
||||
<p>
|
||||
|
||||
When you want to read from the graph, you simply call <span style="font-family:monospace;">ma_node_graph_read_pcm_frames()</span>.</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; overflow-y:hidden;">
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../miniaudio.c"</span>
|
||||
|
||||
<span style="color:#009900">/* Data Format */</span>
|
||||
|
||||
@@ -287,7 +287,7 @@ for processing jobs. That is more advanced, and beyond the scope of this example
|
||||
When you initialize a resource manager you can specify the sample format, channels and sample rate to use when reading
|
||||
data from the data source. This means the resource manager will ensure all sounds will have a standard format. When not
|
||||
set, each sound will have their own formats and you'll need to do the necessary data conversion yourself.</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; overflow-y:hidden;">
|
||||
<span style="color:#666666">#define</span> MA_NO_ENGINE <span style="color:#009900">/* We're intentionally not using the ma_engine API here. */</span>
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../miniaudio.c"</span>
|
||||
|
||||
|
||||
@@ -272,7 +272,7 @@ threads. You can also implement your own custom job threads which this example a
|
||||
|
||||
In this example we show how you can create a data source, mix them with other data sources, configure the number of job
|
||||
threads to manage internally and how to implement your own custom job thread.</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; overflow-y:hidden;">
|
||||
<span style="color:#666666">#define</span> MA_NO_ENGINE <span style="color:#009900">/* We're intentionally not using the ma_engine API here. */</span>
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../miniaudio.c"</span>
|
||||
|
||||
|
||||
@@ -262,7 +262,7 @@ specified on the command line.
|
||||
Capturing works in a very similar way to playback. The only difference is the direction of data movement. Instead of
|
||||
the application sending data to the device, the device will send data to the application. This example just writes the
|
||||
data received by the microphone straight to a WAV file.</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; overflow-y:hidden;">
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../miniaudio.c"</span>
|
||||
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300"><stdlib.h></span>
|
||||
|
||||
@@ -264,7 +264,7 @@ Note that the microphone and playback device must run in lockstep. Any kind of t
|
||||
glitching which the backend may not be able to recover from. For this reason, miniaudio forces you to use the same
|
||||
sample rate for both capture and playback. If internally the native sample rates differ, miniaudio will perform the
|
||||
sample rate conversion for you automatically.</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; overflow-y:hidden;">
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../miniaudio.c"</span>
|
||||
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300"><stdio.h></span>
|
||||
|
||||
@@ -261,7 +261,7 @@ context sits above a device. You can have many devices to one context.
|
||||
|
||||
If you use device enumeration, you should explicitly specify the same context you used for enumeration in the call to
|
||||
<span style="font-family:monospace;">ma_device_init()</span> when you initialize your devices.</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; overflow-y:hidden;">
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../miniaudio.c"</span>
|
||||
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300"><stdio.h></span>
|
||||
|
||||
@@ -266,7 +266,7 @@ used indirectly with PulseAudio by choosing the appropriate loopback device afte
|
||||
|
||||
To use loopback mode you just need to set the device type to ma_device_type_loopback and set the capture device config
|
||||
properties. The output buffer in the callback will be null whereas the input buffer will be valid.</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; overflow-y:hidden;">
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../miniaudio.c"</span>
|
||||
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300"><stdlib.h></span>
|
||||
|
||||
@@ -257,7 +257,7 @@ Shows one way to handle looping of a sound.
|
||||
This example uses a decoder as the data source. Decoders can be used with the <span style="font-family:monospace;">ma_data_source</span> API which, conveniently,
|
||||
supports looping via the <span style="font-family:monospace;">ma_data_source_read_pcm_frames()</span> API. To use it, all you need to do is pass a pointer to the
|
||||
decoder straight into <span style="font-family:monospace;">ma_data_source_read_pcm_frames()</span> and it will just work.</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; overflow-y:hidden;">
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../miniaudio.c"</span>
|
||||
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300"><stdio.h></span>
|
||||
|
||||
@@ -259,10 +259,10 @@ device and then mix your sounds together which you can do by simply summing thei
|
||||
do this is to use floating point samples and use miniaudio's built-in clipper to handling clipping for you. (Clipping
|
||||
is when sample are clamped to their minimum and maximum range, which for floating point is -1..1.)
|
||||
</p>
|
||||
<div style="font-family:monospace; margin:1em 0em;"><pre style="margin:0.5em 1em; padding:0; line-height:125%; overflow-x:auto;">
|
||||
<div style="font-family:monospace; margin:1em 0em;"><pre style="margin:0.5em 1em; padding:0; line-height:125%; overflow-x:auto; overflow-y:hidden;">
|
||||
Usage: simple_mixing [input file 0] [input file 1] ... [input file n]
|
||||
Example: simple_mixing file1.wav file2.flac
|
||||
</pre></div><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;">
|
||||
</pre></div><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:#666666">#include</span> <span style="color:#cc3300">"../miniaudio.c"</span>
|
||||
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300"><stdio.h></span>
|
||||
|
||||
@@ -264,7 +264,7 @@ This example uses the <span style="font-family:monospace;">ma_decoder</span> API
|
||||
device and can be used independently of it. This example only plays back a single sound file, but it's possible to play
|
||||
back multiple files by simple loading multiple decoders and mixing them (do not create multiple devices to do this). See
|
||||
the simple_mixing example for how best to do this.</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; overflow-y:hidden;">
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../miniaudio.c"</span>
|
||||
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300"><stdio.h></span>
|
||||
|
||||
@@ -270,7 +270,7 @@ the <span style="font-family:monospace;">ma_waveform_read_pcm_frames()</span> AP
|
||||
<p>
|
||||
|
||||
This example works with Emscripten.</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; overflow-y:hidden;">
|
||||
<span style="color:#666666">#define</span> MA_NO_DECODING
|
||||
<span style="color:#666666">#define</span> MA_NO_ENCODING
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../miniaudio.c"</span>
|
||||
|
||||
@@ -272,7 +272,7 @@ information on the available features.
|
||||
To use this example, pass in the path of a sound as the first argument. The sound will be
|
||||
positioned in front of the listener, while the listener rotates on the the spot to create an
|
||||
orbiting effect. Terminate the program with Ctrl+C.</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; overflow-y:hidden;">
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300">"../miniaudio.c"</span>
|
||||
|
||||
<span style="color:#666666">#include</span> <span style="color:#cc3300"><stdio.h></span>
|
||||
|
||||
+128
-128
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user