mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 08:14:04 +02:00
Update website.
This commit is contained in:
@@ -246,23 +246,23 @@ a.doc-navigation-l4 {
|
||||
<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="fixed_size_callback.html" class="doc-navigation doc-navigation-l1 doc-navigation-active">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_android_test.html" class="doc-navigation doc-navigation-l1 ">Simple Playback Android Test</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>Fixed Size Callback</h1><p style="overflow:hidden;">
|
||||
<h1>Fixed Size Callback</h1><p>
|
||||
Shows one way to implement a data callback that is called with a fixed frame count.
|
||||
</p>
|
||||
<p style="overflow:hidden;">
|
||||
<p>
|
||||
|
||||
miniaudio does not have built-in support for firing the data callback with fixed sized buffers. In order to support
|
||||
this you need to implement a layer that sits on top of the normal data callback. This example demonstrates one way of
|
||||
doing this.
|
||||
</p>
|
||||
<p style="overflow:hidden;">
|
||||
<p>
|
||||
|
||||
This example uses a ring buffer to act as the intermediary buffer between the low-level device callback and the fixed
|
||||
sized callback. You do not need to use a ring buffer here, but it's a good opportunity to demonstrate how to use
|
||||
miniaudio's ring buffer API. The ring buffer in this example is in global scope for simplicity, but you can pass it
|
||||
around as user data for the device (device.pUserData).
|
||||
</p>
|
||||
<p style="overflow:hidden;">
|
||||
<p>
|
||||
|
||||
This example only works for output devices, but can be implemented for input devices by simply swapping the direction
|
||||
of data movement.</p>
|
||||
|
||||
Reference in New Issue
Block a user