mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
Update website.
This commit is contained in:
@@ -245,7 +245,7 @@ a.doc-navigation-l4 {
|
||||
<div style="background-color:#fff; padding-bottom:0em; border-top:solid 1px #003800; background-color:#eee;">
|
||||
<table border="0" style="margin:0 auto; width:100%; border-collapse:collapse; border:solid 0px #000; table-layout:fixed;"><tr>
|
||||
<td valign="top" style="width:20em; padding:0; margin:0; border-right:solid 0px #000;"><div style="position:relative; height:100%; width:100%; border:solid 0px #000; padding:0; margin:0;">
|
||||
<a href="../index.html" class="doc-navigation">Documentation Home</a><a href="../manual/index.html" class="doc-navigation">Programming Manual</a><a href="index.html" class="doc-navigation ">Examples</a><a href="custom_backend.html" class="doc-navigation doc-navigation-l1 ">Custom Backend</a><a href="custom_decoder.html" class="doc-navigation doc-navigation-l1 doc-navigation-active">Custom Decoder</a><a href="data_source_chaining.html" class="doc-navigation doc-navigation-l1 ">Data Source Chaining</a><a href="fixed_size_callback.html" class="doc-navigation doc-navigation-l1 ">Fixed Size Callback</a><a href="simple_capture.html" class="doc-navigation doc-navigation-l1 ">Simple Capture</a><a href="simple_duplex.html" class="doc-navigation doc-navigation-l1 ">Simple Duplex</a><a href="simple_enumeration.html" class="doc-navigation doc-navigation-l1 ">Simple Enumeration</a><a href="simple_loopback.html" class="doc-navigation doc-navigation-l1 ">Simple Loopback</a><a href="simple_looping.html" class="doc-navigation doc-navigation-l1 ">Simple Looping</a><a href="simple_mixing.html" class="doc-navigation doc-navigation-l1 ">Simple Mixing</a><a href="simple_playback.html" class="doc-navigation doc-navigation-l1 ">Simple Playback</a><a href="simple_playback_sine.html" class="doc-navigation doc-navigation-l1 ">Simple Playback Sine</a><a href="../api/index.html" class="doc-navigation" style="border-bottom:none;">API Reference</a></div></td><td valign="top" style="padding:1em; border-left:solid 1px #bbb;">
|
||||
<a href="../index.html" class="doc-navigation">Documentation Home</a><a href="../manual/index.html" class="doc-navigation">Programming Manual</a><a href="index.html" class="doc-navigation ">Examples</a><a href="custom_backend.html" class="doc-navigation doc-navigation-l1 ">Custom Backend</a><a href="custom_decoder.html" class="doc-navigation doc-navigation-l1 doc-navigation-active">Custom Decoder</a><a href="custom_decoder_engine.html" class="doc-navigation doc-navigation-l1 ">Custom Decoder Engine</a><a href="data_source_chaining.html" class="doc-navigation doc-navigation-l1 ">Data Source Chaining</a><a href="duplex_effect.html" class="doc-navigation doc-navigation-l1 ">Duplex Effect</a><a href="engine_advanced.html" class="doc-navigation doc-navigation-l1 ">Engine Advanced</a><a href="engine_effects.html" class="doc-navigation doc-navigation-l1 ">Engine Effects</a><a href="engine_hello_world.html" class="doc-navigation doc-navigation-l1 ">Engine Hello World</a><a href="fixed_size_callback.html" class="doc-navigation doc-navigation-l1 ">Fixed Size Callback</a><a href="node_graph.html" class="doc-navigation doc-navigation-l1 ">Node Graph</a><a href="resource_manager.html" class="doc-navigation doc-navigation-l1 ">Resource Manager</a><a href="resource_manager_advanced.html" class="doc-navigation doc-navigation-l1 ">Resource Manager Advanced</a><a href="simple_capture.html" class="doc-navigation doc-navigation-l1 ">Simple Capture</a><a href="simple_duplex.html" class="doc-navigation doc-navigation-l1 ">Simple Duplex</a><a href="simple_enumeration.html" class="doc-navigation doc-navigation-l1 ">Simple Enumeration</a><a href="simple_loopback.html" class="doc-navigation doc-navigation-l1 ">Simple Loopback</a><a href="simple_looping.html" class="doc-navigation doc-navigation-l1 ">Simple Looping</a><a href="simple_mixing.html" class="doc-navigation doc-navigation-l1 ">Simple Mixing</a><a href="simple_playback.html" class="doc-navigation doc-navigation-l1 ">Simple Playback</a><a href="simple_playback_sine.html" class="doc-navigation doc-navigation-l1 ">Simple Playback Sine</a><a href="../api/index.html" class="doc-navigation" style="border-bottom:none;">API Reference</a></div></td><td valign="top" style="padding:1em; border-left:solid 1px #bbb;">
|
||||
<h1>Custom Decoder</h1><p>
|
||||
Demonstrates how to implement a custom decoder.
|
||||
</p>
|
||||
@@ -255,18 +255,12 @@ This example implements two custom decoders:
|
||||
</p>
|
||||
<ul style="overflow:hidden;">
|
||||
<li>
|
||||
</li>
|
||||
</ul>
|
||||
<ul style="overflow:hidden;">
|
||||
Vorbis via libvorbis</li>
|
||||
<li>
|
||||
Vorbis via libvorbis
|
||||
</li>
|
||||
<li>
|
||||
Opus via libopus
|
||||
|
||||
A </li>
|
||||
Opus via libopus</li>
|
||||
</ul>
|
||||
<p>
|
||||
|
||||
A custom decoder must implement a data source. In this example, the libvorbis data source is called
|
||||
<span style="font-family:monospace;">ma_libvorbis</span> and the Opus data source is called <span style="font-family:monospace;">ma_libopus</span>. These two objects are compatible
|
||||
with the <span style="font-family:monospace;">ma_data_source</span> APIs and can be taken straight from this example and used in real code.
|
||||
@@ -358,8 +352,7 @@ The <span style="font-family:monospace;">onInitFile</span>, <span style="font-fa
|
||||
ma_decoding_backend_init_file__libvorbis,
|
||||
NULL, <span style="color:#009900">/* onInitFileW() */</span>
|
||||
NULL, <span style="color:#009900">/* onInitMemory() */</span>
|
||||
ma_decoding_backend_uninit__libvorbis,
|
||||
ma_decoding_backend_get_channel_map__libvorbis
|
||||
ma_decoding_backend_uninit__libvorbis
|
||||
};
|
||||
|
||||
|
||||
@@ -435,8 +428,7 @@ The <span style="font-family:monospace;">onInitFile</span>, <span style="font-fa
|
||||
ma_decoding_backend_init_file__libopus,
|
||||
NULL, <span style="color:#009900">/* onInitFileW() */</span>
|
||||
NULL, <span style="color:#009900">/* onInitMemory() */</span>
|
||||
ma_decoding_backend_uninit__libopus,
|
||||
ma_decoding_backend_get_channel_map__libopus
|
||||
ma_decoding_backend_uninit__libopus
|
||||
};
|
||||
|
||||
|
||||
@@ -496,7 +488,7 @@ The <span style="font-family:monospace;">onInitFile</span>, <span style="font-fa
|
||||
|
||||
|
||||
<span style="color:#009900">/* Initialize the device. */</span>
|
||||
result = ma_data_source_get_data_format(&decoder, &format, &channels, &sampleRate);
|
||||
result = ma_data_source_get_data_format(&decoder, &format, &channels, &sampleRate, NULL, 0);
|
||||
<span style="color:#0033ff">if</span> (result != MA_SUCCESS) {
|
||||
printf(<span style="color:#cc3300">"Failed to retrieve decoder data format."</span>);
|
||||
ma_decoder_uninit(&decoder);
|
||||
|
||||
Reference in New Issue
Block a user