added the readme

This commit is contained in:
2026-06-08 17:07:34 -04:00
commit 6655fd2886
1001 changed files with 253651 additions and 0 deletions
@@ -0,0 +1,772 @@
<html>
<head>
<title>Core API Advanced Topics</title>
<link rel="stylesheet" href="style/docs.css">
<link rel="stylesheet" href="style/code_highlight.css">
<script type="text/javascript" src="scripts/language-selector.js"></script></head>
<body>
<div class="docs-body">
<div class="manual-toc">
<p>FMOD Engine User Manual 2.03</p>
<ul>
<li><a href="welcome.html">Welcome to the FMOD Engine</a></li>
<li><a href="core-api-concepts.html">Core API Key Concepts</a></li>
<li><a href="running-the-core-api.html">Core API Getting Started</a></li>
<li><a href="loading-and-playing-sounds-in-the-core-api.html">Core API Loading and Playing Sounds</a></li>
<li><a href="spatializing-sounds-in-the-core-api.html">Core API Spatializing Sounds</a></li>
<li><a href="mixing-and-routing-in-the-core-api.html">Core API Mixing and Routing</a></li>
<li><a href="using-dsp-effects-in-the-core-api.html">Core API Using DSP Effects</a></li>
<li><a href="effects-reference.html">Core API Effect Reference</a></li>
<li><a href="managing-resources-in-the-core-api.html">Core API Managing Resources</a></li>
<li class="manual-current-chapter manual-active-chapter"><a href="advanced-core-api-topics.html">Core API Advanced Topics</a><ul>
<li><a href="#detecting-audio-devices">Detecting Audio Devices</a></li>
<li><a href="#extracting-pcm-data-from-a-sound">Extracting PCM Data from a Sound</a></li>
<li><a href="#linking-plug-ins">Linking Plug-ins</a><ul>
<li><a href="#static">Static</a><ul>
<li><a href="#codec-example">Codec Example</a></li>
<li><a href="#output-example">Output Example</a></li>
<li><a href="#dsp-example">DSP Example</a></li>
</ul>
</li>
<li><a href="#dynamic">Dynamic</a><ul>
<li><a href="#codec-example_1">Codec Example</a></li>
<li><a href="#output-example_1">Output Example</a></li>
<li><a href="#dsp-example_1">DSP Example</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#recording">Recording</a></li>
<li><a href="#using-output-plug-ins">Using Output Plug-ins</a></li>
<li><a href="#3d-polygon-based-geometry-occlusion">3D Polygon-based Geometry Occlusion</a></li>
<li><a href="#virtual-3d-reverb-system">Virtual 3D Reverb System</a><ul>
<li><a href="#3d-reverbs">3D Reverbs</a></li>
<li><a href="#using-multiple-reverbs">Using Multiple Reverbs</a></li>
</ul>
</li>
<li><a href="#transitioning-from-fmod-ex">Transitioning from FMOD Ex</a><ul>
<li><a href="#studio-api-versus-fmod-designer-api">Studio API Versus FMOD Designer API</a><ul>
<li><a href="#eventsystem-and-eventsystem_create">EventSystem and EventSystem_Create</a></li>
<li><a href="#eventproject">EventProject</a></li>
<li><a href="#fev-and-fsb-files">FEV and FSB Files</a></li>
<li><a href="#eventgroup">EventGroup</a></li>
<li><a href="#event">Event</a></li>
<li><a href="#retrieving-events">Retrieving Events</a></li>
<li><a href="#eventparameter">EventParameter</a></li>
<li><a href="#sustain-points-and-key-off">Sustain Points and Key Off</a></li>
<li><a href="#eventcategory">EventCategory</a></li>
<li><a href="#eventreverb">EventReverb</a></li>
<li><a href="#eventqueue-and-eventqueueentry">EventQueue and EventQueueEntry</a></li>
<li><a href="#musicsystem-and-musicprompt">MusicSystem and MusicPrompt</a></li>
<li><a href="#neteventsystem">NetEventSystem</a></li>
</ul>
</li>
<li><a href="#fmod-studios-core-api-versus-fmod-exs-core-api">FMOD Studio's Core API Versus FMOD Ex's Core API</a><ul>
<li><a href="#no-more-recommended-startup-sequence">No more 'recommended startup sequence'</a></li>
<li><a href="#added-new-dsp-effects">Added new DSP effects</a></li>
<li><a href="#new-file-format-support">New file format support</a></li>
<li><a href="#dolby-atmos-support">Dolby Atmos support</a></li>
<li><a href="#new-dsp-mixing-engine">New DSP mixing engine</a></li>
<li><a href="#added-plug-in-info-helper-function">Added plug-in info helper function</a></li>
<li><a href="#added-background-suspension-support">Added background suspension support</a></li>
<li><a href="#channelgroups-volume-and-panning-are-now-dsp-based-rather-than-reaching-down-to-the-channels-of-the-child-channelgroups">ChannelGroups volume and panning are now DSP based, rather than reaching down to the Channels of the child ChannelGroups.</a></li>
<li><a href="#added-additional-output-streams">Added additional output streams</a></li>
<li><a href="#added-sound-helper-function">Added Sound helper function</a></li>
<li><a href="#added-sample-volume-control">Added sample volume control</a></li>
<li><a href="#added-utf8-support">Added UTF8 support</a></li>
<li><a href="#added-concept-of-a-fader-dsp-per-channel-and-channelgroup">Added concept of a 'fader' DSP per Channel and ChannelGroup</a></li>
<li><a href="#new-dspconnection-types-supported">New DSPConnection types supported</a></li>
<li><a href="#new-dsp-parameter-types">New DSP parameter types</a></li>
<li><a href="#fmod_hardware-support">FMOD_HARDWARE support</a></li>
<li><a href="#channels-and-channelgroups-have-been-merged-into-channelcontrol">Channels and ChannelGroups have been merged into 'ChannelControl'</a></li>
<li><a href="#converting-fmod-reverb-parameters">Converting FMOD Reverb parameters</a></li>
<li><a href="#system_set3dspeakerposition-renamed">System::set3DSpeakerPosition renamed</a></li>
<li><a href="#fmod_channel_free-fmod_channel_reuse-removed-default-channelgroup-now-passed-to-playsound-if-needed">FMOD_CHANNEL_FREE / FMOD_CHANNEL_REUSE removed. Default ChannelGroup now passed to playSound if needed</a></li>
<li><a href="#cdrom-cdda-support-removed">CDROM / CDDA support removed</a></li>
<li><a href="#system_getspectrum-and-system_getwavedata-removed">System::getSpectrum and System::getWaveData removed</a></li>
<li><a href="#w-function-wide-char-support-removed">'W' function wide char support removed</a></li>
<li><a href="#system_setreverbambientproperties-removed">System::setReverbAmbientProperties removed</a></li>
<li><a href="#system_getdspclock-removed">System::getDSPClock removed</a></li>
<li><a href="#getmemoryinfo-functions-have-been-removed-from-all-classes">getMemoryInfo functions have been removed from all classes</a></li>
<li><a href="#sound_setvariations-and-sound_getvariations-have-been-removed">Sound::setVariations and Sound::getVariations have been removed</a></li>
<li><a href="#sound_setsubsoundsentence-has-been-removed">Sound::setSubSoundSentence has been removed</a></li>
<li><a href="#setdelay-and-clock-functions-now-use-64bit-long-long-type-rather-than-than-32bit-hi-and-32bit-low-part-parameters">setDelay and clock functions now use 64bit 'long long' type rather than than 32bit hi and 32bit low part parameters.</a></li>
<li><a href="#channel_setspeakermix-channel_setspeakerlevels-channel_setinputchannelmix-channel_getpan-channel_getspeakermix-and-channel_getspeakerlevels-removed">Channel::setSpeakerMix, Channel::setSpeakerLevels, Channel::setInputChannelMix, Channel::getPan, Channel::getSpeakerMix and Channel::getSpeakerLevels removed</a></li>
<li><a href="#dspconnection_setlevelsgetlevels-have-been-removed">DSPConnection::setLevels/getLevels have been removed.</a></li>
<li><a href="#channel_set3dpanlevel-misnomer-renamed">Channel::set3DPanLevel misnomer renamed</a></li>
<li><a href="#override-functions-removed-from-channelgroup-class">'override' functions removed from ChannelGroup class</a></li>
<li><a href="#system_adddsp-removed-from-the-system-api">System::addDSP removed from the System API</a></li>
<li><a href="#dsp_remove-removed-from-the-dsp-api">DSP::remove removed from the DSP API</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><a href="core-api.html">Core API Reference</a></li>
<li><a href="studio-api-getting-started.html">Studio API Getting Started</a></li>
<li><a href="studio-guide.html">Studio API Guide</a></li>
<li><a href="studio-api-3d-events.html">Studio API 3D Events</a></li>
<li><a href="studio-api-threads.html">Studio API Threads</a></li>
<li><a href="studio-api.html">Studio API Reference</a></li>
<li><a href="platforms.html">Platform Details</a></li>
<li><a href="dsp-plugin-api-guide.html">Plug-in DSP API Guide</a></li>
<li><a href="plugin-api.html">Plug-in API Reference</a></li>
<li><a href="fsbank-api.html">FSBank API Reference</a></li>
<li><a href="troubleshooting.html">Troubleshooting</a></li>
<li><a href="glossary.html">Glossary</a></li>
</ul>
</div>
<div class="manual-content api">
<h1>10. Core API Advanced Topics</h1>
<h2 id="detecting-audio-devices"><a href="#detecting-audio-devices">10.1 Detecting Audio Devices</a></h2>
<p>The <a href="glossary.html#core-api">Core API</a> has automatic sound card detection and recovery during playback. If a new device is inserted after initialization, the <a href="glossary.html#fmod-engine">FMOD Engine</a> will seamlessly jump to it, assuming it is the higher priority device. An example of this would be a USB headset being plugged in.</p>
<p>If the device that is being played on is removed, the FMOD Engine automatically jumps to the device considered next most important (e.g.: On Windows, it would be the new 'default' device). If a new device is inserted, then removed, the FMOD Engine ends up on the device it was originally playing on before the new device was inserted.</p>
<p>You can override the sound card detection behavior with a custom callback. This is the <a class="apilink" href="core-api-system.html#fmod_system_callback_devicelistchanged">FMOD_SYSTEM_CALLBACK_DEVICELISTCHANGED</a> callback.</p>
<h2 id="extracting-pcm-data-from-a-sound"><a href="#extracting-pcm-data-from-a-sound">10.2 Extracting PCM Data from a Sound</a></h2>
<p>The following demonstrates how to extract PCM data from a <a class="apilink" href="core-api-sound.html">Sound</a> and place it into a buffer using <a class="apilink" href="core-api-sound.html#sound_readdata">Sound::readData</a>. This technique is sometimes used to draw a vizualisation of a waveform, to send the data to another piece of software on the same machine, or to send the data over a network.</p>
<p><a class="apilink" href="core-api-common.html#fmod_openonly">FMOD_OPENONLY</a> must be used for the <code>mode</code> argument of <a class="apilink" href="core-api-system.html#system_createsound">System::createSound</a> to ensure that file handle remains open for reading, as other modes will automatically read the entire file's data and close the file handle. Additionally, <a class="apilink" href="core-api-sound.html#sound_seekdata">Sound::seekData</a> can be used to seek within the Sound's data before reading into a buffer.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD</span><span class="o">::</span><span class="n">Sound</span> <span class="o">*</span><span class="n">sound</span><span class="p">;</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">length</span><span class="p">;</span>
<span class="kt">char</span> <span class="o">*</span><span class="n">buffer</span><span class="p">;</span>
<span class="n">system</span><span class="o">-&gt;</span><span class="n">createSound</span><span class="p">(</span><span class="s">&quot;drumloop.wav&quot;</span><span class="p">,</span> <span class="n">FMOD_OPENONLY</span><span class="p">,</span> <span class="k">nullptr</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">sound</span><span class="p">);</span>
<span class="n">sound</span><span class="o">-&gt;</span><span class="n">getLength</span><span class="p">(</span><span class="o">&amp;</span><span class="n">length</span><span class="p">,</span> <span class="n">FMOD_TIMEUNIT_RAWBYTES</span><span class="p">);</span>
<span class="n">buffer</span> <span class="o">=</span> <span class="k">new</span> <span class="kt">char</span><span class="p">[</span><span class="n">length</span><span class="p">];</span>
<span class="n">sound</span><span class="o">-&gt;</span><span class="n">readData</span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span> <span class="n">length</span><span class="p">,</span> <span class="k">nullptr</span><span class="p">);</span>
<span class="k">delete</span><span class="p">[]</span> <span class="n">buffer</span><span class="p">;</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_SOUND</span> <span class="o">*</span><span class="n">sound</span><span class="p">;</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">length</span><span class="p">;</span>
<span class="kt">char</span> <span class="o">*</span><span class="n">buffer</span><span class="p">;</span>
<span class="n">FMOD_System_CreateSound</span><span class="p">(</span><span class="n">system</span><span class="p">,</span> <span class="s">&quot;drumloop.wav&quot;</span><span class="p">,</span> <span class="n">FMOD_OPENONLY</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">sound</span><span class="p">);</span>
<span class="n">FMOD_Sound_GetLength</span><span class="p">(</span><span class="n">sound</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">length</span><span class="p">,</span> <span class="n">FMOD_TIMEUNIT_RAWBYTES</span><span class="p">);</span>
<span class="n">buffer</span> <span class="o">=</span> <span class="p">(</span><span class="kt">char</span> <span class="o">*</span><span class="p">)</span><span class="n">malloc</span><span class="p">(</span><span class="n">length</span><span class="p">);</span>
<span class="n">FMOD_Sound_ReadData</span><span class="p">(</span><span class="n">sound</span><span class="p">,</span> <span class="p">(</span><span class="kt">void</span> <span class="o">*</span><span class="p">)</span><span class="n">buffer</span><span class="p">,</span> <span class="n">length</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span>
<span class="n">free</span><span class="p">(</span><span class="n">buffer</span><span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">FMOD</span><span class="p">.</span><span class="n">Sound</span> <span class="n">sound</span><span class="p">;</span>
<span class="kt">uint</span> <span class="n">length</span><span class="p">;</span>
<span class="kt">byte</span><span class="p">[]</span> <span class="n">buffer</span><span class="p">;</span>
<span class="n">system</span><span class="p">.</span><span class="n">createSound</span><span class="p">(</span><span class="s">&quot;drumloop.wav&quot;</span><span class="p">,</span> <span class="n">FMOD</span><span class="p">.</span><span class="n">MODE</span><span class="p">.</span><span class="n">OPENONLY</span><span class="p">,</span> <span class="k">out</span> <span class="n">sound</span><span class="p">);</span>
<span class="n">sound</span><span class="p">.</span><span class="n">getLength</span><span class="p">(</span><span class="k">out</span> <span class="n">length</span><span class="p">,</span> <span class="n">FMOD</span><span class="p">.</span><span class="n">TIMEUNIT</span><span class="p">.</span><span class="n">RAWBYTES</span><span class="p">);</span>
<span class="n">buffer</span> <span class="p">=</span> <span class="k">new</span> <span class="kt">byte</span><span class="p">[(</span><span class="kt">int</span><span class="p">)</span><span class="n">length</span><span class="p">];</span>
<span class="n">sound</span><span class="p">.</span><span class="n">readData</span><span class="p">(</span><span class="n">buffer</span><span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="kd">var</span> <span class="nx">sound</span> <span class="o">=</span> <span class="p">{};</span>
<span class="kd">var</span> <span class="nx">length</span> <span class="o">=</span> <span class="p">{};</span>
<span class="kd">var</span> <span class="nx">buffer</span> <span class="o">=</span> <span class="p">{};</span>
<span class="nx">system</span><span class="p">.</span><span class="nx">createSound</span><span class="p">(</span><span class="s2">&quot;drumloop.wav&quot;</span><span class="p">,</span> <span class="nx">FMOD</span><span class="p">.</span><span class="nx">OPENONLY</span><span class="p">,</span> <span class="kc">null</span><span class="p">,</span> <span class="nx">sound</span><span class="p">);</span>
<span class="nx">sound</span> <span class="o">=</span> <span class="nx">sound</span><span class="p">.</span><span class="nx">val</span><span class="p">;</span>
<span class="nx">sound</span><span class="p">.</span><span class="nx">getLength</span><span class="p">(</span><span class="nx">length</span><span class="p">,</span> <span class="nx">FMOD</span><span class="p">.</span><span class="nx">TIMEUNIT_RAWBYTES</span><span class="p">);</span>
<span class="nx">length</span> <span class="o">=</span> <span class="nx">length</span><span class="p">.</span><span class="nx">val</span><span class="p">;</span>
<span class="nx">sound</span><span class="p">.</span><span class="nx">readData</span><span class="p">(</span><span class="nx">buffer</span><span class="p">,</span> <span class="nx">length</span><span class="p">,</span> <span class="kc">null</span><span class="p">);</span>
<span class="nx">buffer</span> <span class="o">=</span> <span class="nx">buffer</span><span class="p">.</span><span class="nx">val</span><span class="p">;</span>
</pre></div>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-common.html#fmod_timeunit">FMOD_TIMEUNIT</a>, <a class="apilink" href="core-api-common.html#fmod_mode">FMOD_MODE</a>, <a class="apilink" href="core-api-sound.html#sound_getlength">Sound::getLength</a>, <a class="apilink" href="core-api-system.html#system_createsound">System::createSound</a>. <a class="apilink" href="core-api-sound.html#sound_seekdata">Sound::seekData</a></p>
<h2 id="linking-plug-ins"><a href="#linking-plug-ins">10.3 Linking Plug-ins</a></h2>
<p>You can extend the functionality of the <a href="glossary.html#fmod-engine">FMOD Engine</a> through the use of plug-ins. Each plug-in type (<a href="plugin-api-codec.html">codec</a>, <a href="plugin-api-dsp.html">DSP</a> and <a href="plugin-api-output.html">output</a>) has its own API you can use. Whether you have developed the plug-in yourself or you are using one from a third party, there are two ways to integrate it into FMOD.</p>
<h3 id="static"><a href="#static">10.3.1 Static</a></h3>
<p>When the plug-in is available to you as source code, you can hook it up to FMOD by including the source file and using one of the plug-in registration APIs <a class="apilink" href="core-api-system.html#system_registercodec">System::registerCodec</a>, <a class="apilink" href="core-api-system.html#system_registerdsp">System::registerDSP</a> or <a class="apilink" href="core-api-system.html#system_registeroutput">System::registerOutput</a>. Each of these functions accepts the relevant description structure that provides the functionality of the plug-in. By convention, plug-in developers create a function that returns this description structure for you. For example, <code>FMOD_AudioGaming_AudioMotors_GetDSPDescription</code> is the name used by one of our partner plug-ins (it follows the form of "FMOD_[CompanyName]_[ProductName]_Get[PluginType]Description").</p>
<p>Alternatively, if you don't have source code, but you do have a static library (such as .lib or .a) it's almost the same process. Link the static library with your project, then call the description function passing the value into the registration function.</p>
<h4 id="codec-example"><a href="#codec-example">Codec Example</a></h4>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">result</span><span class="p">;</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">handle</span><span class="p">;</span>
<span class="n">FMOD</span><span class="o">::</span><span class="n">Sound</span><span class="o">*</span> <span class="n">sound</span><span class="p">;</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">system</span><span class="o">-&gt;</span><span class="n">registerCodec</span><span class="p">(</span><span class="n">FMOD_Example_GetCodecDescription</span><span class="p">(),</span> <span class="o">&amp;</span><span class="n">handle</span><span class="p">);</span>
<span class="c1">// example.xyz is a file encoded with the codec&#39;s corresponding encoder</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">system</span><span class="o">-&gt;</span><span class="n">createSound</span><span class="p">(</span><span class="s">&quot;example.xyz&quot;</span><span class="p">,</span> <span class="n">FMOD_DEFAULT</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">sound</span><span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">result</span><span class="p">;</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">handle</span><span class="p">;</span>
<span class="n">FMOD_SOUND</span><span class="o">*</span> <span class="n">sound</span><span class="p">;</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">FMOD_System_RegisterCodec</span><span class="p">(</span><span class="n">system</span><span class="p">,</span> <span class="n">FMOD_Example_GetCodecDescription</span><span class="p">(),</span> <span class="o">&amp;</span><span class="n">handle</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span>
<span class="c1">// example.xyz is a file encoded with the codec&#39;s corresponding encoder</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">FMOD_System_CreateSound</span><span class="p">(</span><span class="n">system</span><span class="p">,</span> <span class="s">&quot;example.xyz&quot;</span><span class="p">,</span> <span class="n">FMOD_DEFAULT</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">sound</span><span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="kd">var</span> <span class="nx">result</span> <span class="o">=</span> <span class="p">{};</span>
<span class="kd">var</span> <span class="nx">handle</span> <span class="o">=</span> <span class="p">{};</span>
<span class="kd">var</span> <span class="nx">sound</span> <span class="o">=</span> <span class="p">{};</span>
<span class="kd">var</span> <span class="nx">outval</span> <span class="o">=</span> <span class="p">{};</span>
<span class="nx">result</span> <span class="o">=</span> <span class="nx">system</span><span class="p">.</span><span class="nx">registerCodec</span><span class="p">(</span><span class="nx">FMOD_Example_GetCodecDescription</span><span class="p">(),</span> <span class="nx">outval</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span>
<span class="nx">handle</span> <span class="o">=</span> <span class="nx">outval</span><span class="p">.</span><span class="nx">val</span><span class="p">;</span>
<span class="c1">// example.xyz is a file encoded with the codec&#39;s corresponding encoder</span>
<span class="nx">result</span> <span class="o">=</span> <span class="nx">system</span><span class="p">.</span><span class="nx">createSound</span><span class="p">(</span><span class="s2">&quot;example.xyz&quot;</span><span class="p">,</span> <span class="nx">FMOD</span><span class="p">.</span><span class="nx">DEFAULT</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="nx">outval</span><span class="p">);</span>
<span class="nx">sound</span> <span class="o">=</span> <span class="nx">outval</span><span class="p">.</span><span class="nx">val</span><span class="p">;</span>
</pre></div>
<div class="admonition language-csharp">
<p>Currently not supported for C#.</p>
</div>
<h4 id="output-example"><a href="#output-example">Output Example</a></h4>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">result</span><span class="p">;</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">handle</span><span class="p">;</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">system</span><span class="o">-&gt;</span><span class="n">registerOutput</span><span class="p">(</span><span class="n">FMOD_Example_GetOutputDescription</span><span class="p">(),</span> <span class="o">&amp;</span><span class="n">handle</span><span class="p">);</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">system</span><span class="o">-&gt;</span><span class="n">setOutputByPlugin</span><span class="p">(</span><span class="n">handle</span><span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">result</span><span class="p">;</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">handle</span><span class="p">;</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">FMOD_System_RegisterOutput</span><span class="p">(</span><span class="n">system</span><span class="p">,</span> <span class="n">FMOD_Example_GetCodecDescription</span><span class="p">(),</span> <span class="o">&amp;</span><span class="n">handle</span><span class="p">);</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">FMOD_System_SetOutputByPlugin</span><span class="p">(</span><span class="n">system</span><span class="p">,</span> <span class="n">handle</span><span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="kd">var</span> <span class="nx">result</span> <span class="o">=</span> <span class="p">{};</span>
<span class="kd">var</span> <span class="nx">handle</span> <span class="o">=</span> <span class="p">{};</span>
<span class="kd">var</span> <span class="nx">outval</span> <span class="o">=</span> <span class="p">{};</span>
<span class="nx">result</span> <span class="o">=</span> <span class="nx">system</span><span class="p">.</span><span class="nx">registerOutput</span><span class="p">(</span><span class="nx">FMOD_Example_GetOutputDescription</span><span class="p">(),</span> <span class="nx">outval</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span>
<span class="nx">handle</span> <span class="o">=</span> <span class="nx">outval</span><span class="p">.</span><span class="nx">val</span><span class="p">;</span>
<span class="nx">result</span> <span class="o">=</span> <span class="nx">system</span><span class="p">.</span><span class="nx">setOutputByPlugin</span><span class="p">(</span><span class="nx">handle</span><span class="p">);</span>
</pre></div>
<div class="admonition language-csharp">
<p>Currently not supported for C#.</p>
</div>
<h4 id="dsp-example"><a href="#dsp-example">DSP Example</a></h4>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD</span><span class="o">::</span><span class="n">Channel</span><span class="o">*</span> <span class="n">channel</span><span class="p">;</span>
<span class="n">FMOD</span><span class="o">::</span><span class="n">DSP</span><span class="o">*</span> <span class="n">dsp</span><span class="p">;</span>
<span class="n">FMOD_RESULT</span> <span class="n">result</span><span class="p">;</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">handle</span><span class="p">;</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">system</span><span class="o">-&gt;</span><span class="n">registerDSP</span><span class="p">(</span><span class="n">FMOD_Example_GetDSPDescription</span><span class="p">(),</span> <span class="o">&amp;</span><span class="n">handle</span><span class="p">);</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">system</span><span class="o">-&gt;</span><span class="n">playSound</span><span class="p">(</span><span class="n">sound</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="nb">false</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">channel</span><span class="p">);</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">system</span><span class="o">-&gt;</span><span class="n">createDSPByPlugin</span><span class="p">(</span><span class="n">handle</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">dsp</span><span class="p">);</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">channel</span><span class="o">-&gt;</span><span class="n">addDSP</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">dsp</span><span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_CHANNEL</span><span class="o">*</span> <span class="n">channel</span><span class="p">;</span>
<span class="n">FMOD_DSP</span><span class="o">*</span> <span class="n">dsp</span><span class="p">;</span>
<span class="n">FMOD_RESULT</span> <span class="n">result</span><span class="p">;</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">handle</span><span class="p">;</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">FMOD_System_RegisterDSP</span><span class="p">(</span><span class="n">system</span><span class="p">,</span> <span class="n">FMOD_Example_GetDSPDescription</span><span class="p">(),</span> <span class="o">&amp;</span><span class="n">handle</span><span class="p">);</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">FMOD_System_PlaySound</span><span class="p">(</span><span class="n">system</span><span class="p">,</span> <span class="n">sound</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="nb">false</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">channel</span><span class="p">);</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">FMOD_System_CreateDSPByPlugin</span><span class="p">(</span><span class="n">system</span><span class="p">,</span> <span class="n">handle</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">dsp</span><span class="p">);</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">FMOD_Channel_AddDSP</span><span class="p">(</span><span class="n">channel</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">dsp</span><span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="kd">var</span> <span class="nx">result</span> <span class="o">=</span> <span class="p">{};</span>
<span class="kd">var</span> <span class="nx">handle</span> <span class="o">=</span> <span class="p">{};</span>
<span class="kd">var</span> <span class="nx">dsp</span> <span class="o">=</span> <span class="p">{};</span>
<span class="kd">var</span> <span class="nx">channel</span> <span class="o">=</span> <span class="p">{};</span>
<span class="kd">var</span> <span class="nx">outval</span> <span class="o">=</span> <span class="p">{};</span>
<span class="nx">result</span> <span class="o">=</span> <span class="nx">system</span><span class="p">.</span><span class="nx">registerDSP</span><span class="p">(</span><span class="nx">FMOD_Example_GetDSPDescription</span><span class="p">(),</span> <span class="nx">outval</span><span class="p">);</span>
<span class="nx">handle</span> <span class="o">=</span> <span class="nx">outval</span><span class="p">.</span><span class="nx">val</span><span class="p">;</span>
<span class="nx">result</span> <span class="o">=</span> <span class="nx">system</span><span class="p">.</span><span class="nx">playSound</span><span class="p">(</span><span class="nx">sound</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="kc">false</span><span class="p">,</span> <span class="nx">outval</span><span class="p">);</span>
<span class="nx">channel</span> <span class="o">=</span> <span class="nx">outval</span><span class="p">.</span><span class="nx">val</span><span class="p">;</span>
<span class="nx">result</span> <span class="o">=</span> <span class="nx">system</span><span class="p">.</span><span class="nx">createDSPByPlugin</span><span class="p">(</span><span class="nx">handle</span><span class="p">,</span> <span class="nx">outval</span><span class="p">);</span>
<span class="nx">dsp</span> <span class="o">=</span> <span class="nx">outval</span><span class="p">.</span><span class="nx">val</span><span class="p">;</span>
<span class="nx">result</span> <span class="o">=</span> <span class="nx">channel</span><span class="p">.</span><span class="nx">addDSP</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="nx">dsp</span><span class="p">);</span>
</pre></div>
<div class="admonition language-csharp">
<p>Currently not supported for C#.</p>
</div>
<h3 id="dynamic"><a href="#dynamic">10.3.2 Dynamic</a></h3>
<p>Another way plug-in code is distributed is via a prebuilt dynamic library (such as .so, .dll or .dylib). These are even easier to integrate with FMOD than static libraries.</p>
<p>First, ensure the plug-in file is in the working directory of your application. This is often the same location as the application executable. Then, in your code call <a class="apilink" href="core-api-system.html#system_loadplugin">System::loadPlugin</a>, passing in the name of the library.</p>
<p>That's all there is to it. Under the hood, the FMOD Engine will open the library and search for well known functions similar to the description functions mentioned above. Once found, the plug-in is registered and ready for use.</p>
<h4 id="codec-example_1"><a href="#codec-example_1">Codec Example</a></h4>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">result</span><span class="p">;</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">handle</span><span class="p">;</span>
<span class="n">FMOD</span><span class="o">::</span><span class="n">Sound</span><span class="o">*</span> <span class="n">sound</span><span class="p">;</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">system</span><span class="o">-&gt;</span><span class="n">loadPlugin</span><span class="p">(</span><span class="s">&quot;example_codec.dll&quot;</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">handle</span><span class="p">);</span>
<span class="c1">// example.xyz is a file encoded with the codec&#39;s corresponding encoder</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">system</span><span class="o">-&gt;</span><span class="n">createSound</span><span class="p">(</span><span class="s">&quot;example.xyz&quot;</span><span class="p">,</span> <span class="n">FMOD_DEFAULT</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">sound</span><span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">result</span><span class="p">;</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">handle</span><span class="p">;</span>
<span class="n">FMOD_SOUND</span><span class="o">*</span> <span class="n">sound</span><span class="p">;</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">FMOD_System_LoadPlugin</span><span class="p">(</span><span class="n">system</span><span class="p">,</span> <span class="s">&quot;example_codec.dll&quot;</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">handle</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span>
<span class="c1">// example.xyz is a file encoded with the codec&#39;s corresponding encoder</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">FMOD_System_CreateSound</span><span class="p">(</span><span class="n">system</span><span class="p">,</span> <span class="s">&quot;example.xyz&quot;</span><span class="p">,</span> <span class="n">FMOD_DEFAULT</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">sound</span><span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">FMOD</span><span class="p">.</span><span class="n">Result</span> <span class="n">result</span><span class="p">;</span>
<span class="kt">uint</span> <span class="n">handle</span><span class="p">;</span>
<span class="n">FMOD</span><span class="p">.</span><span class="n">Sound</span> <span class="n">sound</span><span class="p">;</span>
<span class="n">result</span> <span class="p">=</span> <span class="n">system</span><span class="p">.</span><span class="n">loadPlugin</span><span class="p">(</span><span class="s">&quot;example_codec.dll&quot;</span><span class="p">,</span> <span class="k">out</span> <span class="n">handle</span><span class="p">);</span>
<span class="c1">// example.xyz is a file encoded with the codec&#39;s corresponding encoder</span>
<span class="n">result</span> <span class="p">=</span> <span class="n">system</span><span class="p">.</span><span class="n">createSound</span><span class="p">(</span><span class="s">&quot;example.xyz&quot;</span><span class="p">,</span> <span class="n">FMOD</span><span class="p">.</span><span class="n">MODE</span><span class="p">.</span><span class="n">DEFAULT</span><span class="p">,</span> <span class="m">0</span><span class="p">,</span> <span class="k">out</span> <span class="n">sound</span><span class="p">);</span>
</pre></div>
<div class="admonition language-javascript">
<p>Currently not supported for JavaScript.</p>
</div>
<h4 id="output-example_1"><a href="#output-example_1">Output Example</a></h4>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">result</span><span class="p">;</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">handle</span><span class="p">;</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">system</span><span class="o">-&gt;</span><span class="n">loadPlugin</span><span class="p">(</span><span class="s">&quot;example_output.dll&quot;</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">handle</span><span class="p">);</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">system</span><span class="o">-&gt;</span><span class="n">setOutputByPlugin</span><span class="p">(</span><span class="n">handle</span><span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">result</span><span class="p">;</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">handle</span><span class="p">;</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">FMOD_System_LoadPlugin</span><span class="p">(</span><span class="n">system</span><span class="p">,</span> <span class="s">&quot;example_output.dll&quot;</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">handle</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">FMOD_System_SetOutputByPlugin</span><span class="p">(</span><span class="n">system</span><span class="p">,</span> <span class="n">handle</span><span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">FMOD</span><span class="p">.</span><span class="n">Result</span> <span class="n">result</span><span class="p">;</span>
<span class="kt">uint</span> <span class="n">handle</span><span class="p">;</span>
<span class="n">result</span> <span class="p">=</span> <span class="n">system</span><span class="p">.</span><span class="n">loadPlugin</span><span class="p">(</span><span class="s">&quot;example_output.dll&quot;</span><span class="p">,</span> <span class="k">out</span> <span class="n">handle</span><span class="p">);</span>
<span class="n">result</span> <span class="p">=</span> <span class="n">system</span><span class="p">.</span><span class="n">setOutputByPlugin</span><span class="p">(</span><span class="n">handle</span><span class="p">);</span>
</pre></div>
<div class="admonition language-javascript">
<p>Currently not supported for JavaScript.</p>
</div>
<h4 id="dsp-example_1"><a href="#dsp-example_1">DSP Example</a></h4>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD</span><span class="o">::</span><span class="n">Channel</span><span class="o">*</span> <span class="n">channel</span><span class="p">;</span>
<span class="n">FMOD</span><span class="o">::</span><span class="n">DSP</span><span class="o">*</span> <span class="n">dsp</span><span class="p">;</span>
<span class="n">FMOD_RESULT</span> <span class="n">result</span><span class="p">;</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">handle</span><span class="p">;</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">system</span><span class="o">-&gt;</span><span class="n">loadPlugin</span><span class="p">(</span><span class="s">&quot;example_dsp.dll&quot;</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">handle</span><span class="p">);</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">system</span><span class="o">-&gt;</span><span class="n">playSound</span><span class="p">(</span><span class="n">sound</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="nb">false</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">channel</span><span class="p">);</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">system</span><span class="o">-&gt;</span><span class="n">createDSPByPlugin</span><span class="p">(</span><span class="n">handle</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">dsp</span><span class="p">);</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">channel</span><span class="o">-&gt;</span><span class="n">addDSP</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">dsp</span><span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_CHANNEL</span><span class="o">*</span> <span class="n">channel</span><span class="p">;</span>
<span class="n">FMOD_DSP</span><span class="o">*</span> <span class="n">dsp</span><span class="p">;</span>
<span class="n">FMOD_RESULT</span> <span class="n">result</span><span class="p">;</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">handle</span><span class="p">;</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">FMOD_System_LoadPlugin</span><span class="p">(</span><span class="n">system</span><span class="p">,</span> <span class="s">&quot;example_dsp.dll&quot;</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">handle</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">FMOD_System_PlaySound</span><span class="p">(</span><span class="n">system</span><span class="p">,</span> <span class="n">sound</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="nb">false</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">channel</span><span class="p">);</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">FMOD_System_CreateDSPByPlugin</span><span class="p">(</span><span class="n">system</span><span class="p">,</span> <span class="n">handle</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">dsp</span><span class="p">);</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">FMOD_Channel_AddDSP</span><span class="p">(</span><span class="n">channel</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">dsp</span><span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">FMOD</span><span class="p">.</span><span class="n">Channel</span> <span class="n">channel</span><span class="p">;</span>
<span class="n">FMOD</span><span class="p">.</span><span class="n">DSP</span> <span class="n">dsp</span><span class="p">;</span>
<span class="n">FMOD_RESULT</span> <span class="n">result</span><span class="p">;</span>
<span class="kt">uint</span> <span class="n">handle</span><span class="p">;</span>
<span class="n">result</span> <span class="p">=</span> <span class="n">system</span><span class="p">.</span><span class="n">loadPlugin</span><span class="p">(</span><span class="s">&quot;example_dsp.dll&quot;</span><span class="p">,</span> <span class="k">out</span> <span class="n">handle</span><span class="p">);</span>
<span class="n">result</span> <span class="p">=</span> <span class="n">system</span><span class="p">.</span><span class="n">playSound</span><span class="p">(</span><span class="n">sound</span><span class="p">,</span> <span class="m">0</span><span class="p">,</span> <span class="k">false</span><span class="p">,</span> <span class="k">out</span> <span class="n">channel</span><span class="p">);</span>
<span class="n">result</span> <span class="p">=</span> <span class="n">system</span><span class="p">.</span><span class="n">createDSPByPlugin</span><span class="p">(</span><span class="n">handle</span><span class="p">,</span> <span class="k">out</span> <span class="n">dsp</span><span class="p">);</span>
<span class="n">result</span> <span class="p">=</span> <span class="n">channel</span><span class="p">.</span><span class="n">addDSP</span><span class="p">(</span><span class="m">0</span><span class="p">,</span> <span class="n">dsp</span><span class="p">);</span>
</pre></div>
<div class="admonition language-javascript">
<p>Currently not supported for JavaScript.</p>
</div>
<h2 id="recording"><a href="#recording">10.4 Recording</a></h2>
<p>The <a href="glossary.html#core-api">Core API</a> has the ability to record directly from an input into a <a class="apilink" href="core-api-sound.html">Sound</a> object. This <a class="apilink" href="core-api-sound.html">Sound</a> can then be played back after it has been recorded, or the raw data can be retrieved with <a class="apilink" href="core-api-sound.html#sound_lock">Sound::lock</a> and <a class="apilink" href="core-api-sound.html#sound_unlock">Sound::unlock</a> functions.</p>
<p>The <a class="apilink" href="core-api-sound.html">Sound</a> can also be played while it is recording, to allow realtime effects. A simple technique to achieve this is to start recording, then wait a small amount of time (for example, 50 ms), then play the <a class="apilink" href="core-api-sound.html">Sound</a>. This keeps the play cursor just behind the record cursor. For information on how to do this and an example of source code, see the "record" example in the <code>/api/core/examples/bin</code> folder of the <a href="glossary.html#fmod-engine">FMOD Engine</a> distribution.</p>
<h2 id="using-output-plug-ins"><a href="#using-output-plug-ins">10.5 Using Output Plug-ins</a></h2>
<p>The <a href="glossary.html#core-api">Core API</a> has support for user-created output plug-ins. A developer can create a plug-in to take FMOD audio output to a custom target. This could be a hardware device, or a non standard file/memory/network based system.</p>
<p>An output mode can run in real-time, or non real-time which allows the developer to run FMOD's <a href="glossary.html#mixer">mixer</a>/streamer/system at faster or slower than real-time rates.</p>
<p>Plug-ins can be created inline with the application, or compiled as a stand-alone dynamic library (ie .dll or .so)</p>
<p>Unlike <a href="glossary.html#dsp">DSP</a> and instrument plug-ins, output plug-ins cannot be used in conjunction with <a href="glossary.html#fmod-studio">FMOD Studio</a>.</p>
<p>See <a class="apilink" href="core-api-system.html#system_registeroutput">System::registerOutput</a> documentation for more.</p>
<h2 id="3d-polygon-based-geometry-occlusion"><a href="#3d-polygon-based-geometry-occlusion">10.6 3D Polygon-based Geometry Occlusion</a></h2>
<p>The Core API supports the supply of polygon mesh data that can be processed in real time to create the effect of occlusion in a 3D world. In real world terms, you can stop sounds from traveling through walls, or even confine reverb inside a geometric volume so that it doesn't leak out into other areas.</p>
<p>To use the FMOD Geometry Engine, create a mesh object with <a class="apilink" href="core-api-system.html#system_creategeometry">System::createGeometry</a>. Then, add polygons to each mesh with <a class="apilink" href="core-api-geometry.html#geometry_addpolygon">Geometry::addPolygon</a>. Each object can be translated, rotated and scaled to fit your environment.</p>
<h2 id="virtual-3d-reverb-system"><a href="#virtual-3d-reverb-system">10.7 Virtual 3D Reverb System</a></h2>
<p>It is common for environments to exhibit different reverberation characteristics in different locations. Ideally as the listener moves throughout the virtual environment, the sound of the reverberation should change accordingly. This change in reverberation properties can be modeled in <a href="glossary.html#fmod-studio">FMOD Studio</a> by using the built in <a class="apilink" href="core-api-reverb3d.html">Reverb3D</a> API.</p>
<h3 id="3d-reverbs"><a href="#3d-reverbs">10.7.1 3D Reverbs</a></h3>
<p>The 3D reverb system works by using the main built-in system I3DL2 reverb, and allows you to place multiple virtual reverb spheres within the 3D world. Each reverb sphere defines:</p>
<ul>
<li>Its position within the 3D world</li>
<li>The area, or sphere of influence affected by the reverb (with minimum and maximum distances)</li>
<li>The reverberation properties of the area</li>
</ul>
<p>At runtime, the <a href="glossary.html#fmod-engine">FMOD Engine</a> interpolates (or morphs) between the characteristics of 3D reverbs according to the listener's proximity and the position and overlap of the reverbs. This method allows the FMOD Engine to use a single <a href="effects-reference.html#sfx-reverb">reverb DSP unit</a> to provide a dynamic reverberation within the 3D world. This process is illustrated in the image below.</p>
<p><img alt="3D Reverb" src="images/3d-reverb.png" /></p>
<p>When the listener is within the sphere of effect of one or more 3D reverbs, the listener hears a weighted combination of the affecting reverbs. When the listener is outside the coverage of all 3D reverbs, the reverb is not applied.</p>
<p>Because this method requires only one reverb <a href="glossary.html#dsp">DSP unit</a> regardless of how many virtual reverb spheres are created, there is no additional CPU cost for creating additional reverb spheres.</p>
<p>By default, 2D <a href="glossary.html#sound">sounds</a> share this same reverb DSP instance. To avoid 2D sounds having reverb, use <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setreverbproperties">ChannelControl::setReverbProperties</a> and set wet = 0, or shift the 2D Sounds to a different reverb DSP instance, using the same function. Adding a second reverb DSP unit for this purpose will incur a small CPU and memory hit.</p>
<p>The following is an example of using the call <a class="apilink" href="core-api-system.html#system_createreverb3d">System::createReverb3D</a>, then setting the characteristics of the reverb using <a class="apilink" href="core-api-reverb3d.html#reverb3d_setproperties">Reverb3D::setProperties</a>.</p>
<div class="highlight language-text"><pre><span></span>FMOD::Reverb *reverb;
result = system-&gt;createReverb3D(&amp;reverb);
FMOD_REVERB_PROPERTIES prop2 = FMOD_PRESET_CONCERTHALL;
reverb-&gt;setProperties(&amp;prop2);
</pre></div>
<p>In order for a reverb to exhibit 3D properties, it is necessary to set its 3D attributes. The method <a class="apilink" href="core-api-reverb3d.html#reverb3d_set3dattributes">Reverb3D::set3DAttributes</a> allows you to set a reverb's origin position, as well as the area of coverage using the minimum distance and maximum distance.</p>
<div class="highlight language-text"><pre><span></span>FMOD_VECTOR pos = { -10.0f, 0.0f, 0.0f };
float mindist = 10.0f;
float maxdist = 20.0f;
reverb-&gt;set3DAttributes(&amp;pos, mindist, maxdist);
</pre></div>
<p>As the 3D reverb uses the position of the listener in its weighting calculation, you also need to ensure that the location of the listener is set using <a href="core-api-system.html#system_set3dlistenerattributes">System::set3dListenerAttributes</a>.</p>
<div class="highlight language-text"><pre><span></span>FMOD_VECTOR listenerpos = { 0.0f, 0.0f, -1.0f };
system-&gt;set3DListenerAttributes(0, &amp;listenerpos, 0, 0, 0);
</pre></div>
<p>This is all that is needed to get virtual 3d reverb zones to work. From this point onwards, based on the listener position, reverb presets should morph into each other if they overlap, and attenuate based on the listener's distance from the 3D reverb sphere's center.</p>
<h3 id="using-multiple-reverbs"><a href="#using-multiple-reverbs">10.7.2 Using Multiple Reverbs</a></h3>
<p>The interpolation of 3D reverbs is only an estimation of how the multiple reverberations within the environment may sound. In some situations, greater realism is required, and so multiple styles of reverberations within a single environment must be modeled. For example, imagine a large church hall with a tunnel down into the catacombs. The reverb applied to the player's footsteps within the church hall (such as <a class="apilink" href="core-api-system.html#fmod_preset_stoneroom">FMOD_PRESET_STONEROOM</a>) could be quite different to that of the monster sounds emitting from the tunnel (which may be applied with both <a class="apilink" href="core-api-system.html#fmod_preset_sewerpipe">FMOD_PRESET_SEWERPIPE</a> and <a class="apilink" href="core-api-system.html#fmod_preset_stoneroom">FMOD_PRESET_STONEROOM</a>). To handle this situation, multiple instances of the <a href="effects-reference.html#sfx-reverb">reverb DSP</a> are required. As many as four instances of the reverb <a href="glossary.html#dsp">DSP</a> can be added to the FMOD <a href="glossary.html#dsp-graph">DSP graph</a>, though each instance incurs a cost of more CPU time and memory usage.</p>
<p><a href="glossary.html#fmod-studio">FMOD Studio</a> allows a sound designer to design their own reverbs, add them to group buses, and use sends and mixer snapshots to control the reverb mix. This section, however, describes how to use the <a href="glossary.html#core-api">Core API</a> to add reverbs, query an instance's reverb properties, and control the wet/dry mix of each reverb instance on a per-channel basis.</p>
<p>Should you want to model multiple reverbs types within an environment without the extra resource expense of multiple reverb effects, use the method described in the <a href="advanced-core-api-topics.html#3d-reverbs">3D Reverbs</a> section of this chapter instead, as it covers using automated 3D reverb zones to simulate reverb for different environments using only a single reverb instance.</p>
<p>Below is an example of using <a class="apilink" href="core-api-system.html#system_setreverbproperties">System::setReverbProperties</a> to set up four different reverb effects. You do not need to explicitly create the extra reverb instance DSP objects, as the FMOD Engine creates them and connects them to the DSP graph when you reference them.</p>
<div class="highlight language-text"><pre><span></span>FMOD_REVERB_PROPERTIES prop1 = FMOD_PRESET_HALLWAY;
FMOD_REVERB_PROPERTIES prop2 = FMOD_PRESET_SEWERPIPE;
FMOD_REVERB_PROPERTIES prop3 = FMOD_PRESET_PARKINGLOT;
FMOD_REVERB_PROPERTIES prop4 = FMOD_PRESET_CONCERTHALL;
</pre></div>
<p>The example defines four different <a class="apilink" href="core-api-system.html#fmod_reverb_properties">FMOD_REVERB_PROPERTIES</a> structures using presets. You can define your own reverb settings, but presets make it easier to get some common reverbs working. For more information about reverb presets, see the <a class="apilink" href="core-api-system.html#fmod_reverb_presets">FMOD_REVERB_PRESETS</a> section of the <a href="core-api.html">Core API Reference</a> chapter.</p>
<p>Once the reverb effects are set up, the 'instance' parameter may be used to set which reverb DSP unit should be used for each preset, while calling the <a class="apilink" href="core-api-system.html#system_setreverbproperties">System::setReverbProperties</a> function.</p>
<div class="highlight language-text"><pre><span></span>result = system-&gt;setReverbProperties(0, &amp;prop1);
result = system-&gt;setReverbProperties(1, &amp;prop2);
result = system-&gt;setReverbProperties(2, &amp;prop3);
result = system-&gt;setReverbProperties(3, &amp;prop4);
</pre></div>
<p>Should you wish to get the current System reverb properties, you must specify the instance number in the 'instance' parameter when calling <a class="apilink" href="core-api-system.html#system_getreverbproperties">System::getReverbProperties</a>, as shown in the below example of getting instance 3's properties. </p>
<div class="highlight language-text"><pre><span></span>FMOD_REVERB_PROPERTIES prop = { 0 };
result = system-&gt;getReverbProperties(3, &amp;prop);
</pre></div>
<p>You can set the wet/dry mix for each reverb on a <a href="glossary.html#channel">channel</a> of the FMOD Engine's <a href="glossary.html#mixer">mixer</a> with <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setreverbproperties">ChannelControl::setReverbProperties</a>. By default, a channel sends to all instances. The example below sets instance 1's send value to linear 0.0 (-80 db) (off).</p>
<div class="highlight language-text"><pre><span></span>result = channel-&gt;setReverbProperties(1, 0.0f);
</pre></div>
<p>To get the reverb mix level to be full volume again, set it to 1 (0db).</p>
<div class="highlight language-text"><pre><span></span>result = channel-&gt;setReverbProperties(1, 1.0f);
</pre></div>
<h2 id="transitioning-from-fmod-ex"><a href="#transitioning-from-fmod-ex">10.8 Transitioning from FMOD Ex</a></h2>
<p>This section describes the differences between FMOD Ex and <a href="glossary.html#fmod-studio">FMOD Studio</a>.</p>
<h3 id="studio-api-versus-fmod-designer-api"><a href="#studio-api-versus-fmod-designer-api">10.8.1 Studio API Versus FMOD Designer API</a></h3>
<p>The <a href="glossary.html#studio-api">Studio API</a> is conceptually similar to the old FMOD Designer API, but most classes have been renamed, and some have been removed or split up.</p>
<h4 id="eventsystem-and-eventsystem_create"><a href="#eventsystem-and-eventsystem_create">EventSystem and EventSystem_Create</a></h4>
<p>The <a class="apilink" href="studio-api-system.html">Studio::System</a> class is analogous to the old EventSystem class. The static <a class="apilink" href="studio-api-system.html#studio_system_create">Studio::System::create</a> function is analogous to the old EventSystem_Create function.</p>
<h4 id="eventproject"><a href="#eventproject">EventProject</a></h4>
<p>The <a class="apilink" href="studio-api-bank.html">Studio::Bank</a> class is analogous to the old EventProject class.</p>
<h4 id="fev-and-fsb-files"><a href="#fev-and-fsb-files">FEV and FSB Files</a></h4>
<p>Each FMOD Designer project produced a single .fev file and multiple <a href="glossary.html#fsb">.fsb</a> files. In contrast, an FMOD Studio project produces multiple <a href="glossary.html#bank-file">.bank files</a>, which contain <a href="glossary.html#metadata">event metadata</a> as well as <a href="glossary.html#sample-data">sample data</a>. See the <a class="apilink" href="studio-api-system.html#studio_system_loadbankfile">Studio::System::loadBankFile</a>, <a class="apilink" href="studio-api-bank.html#studio_bank_loadsampledata">Studio::Bank::loadSampleData</a>, and <a class="apilink" href="studio-api-eventdescription.html#studio_eventdescription_loadsampledata">Studio::EventDescription::loadSampleData</a> functions. The Core API still supports loading .fsb files directly.</p>
<h4 id="eventgroup"><a href="#eventgroup">EventGroup</a></h4>
<p>FMOD Studio doesn't have the concept of EventGroups. Events can be placed in folders, but this has no significance at runtime. To achieve the loading control formerly provided by EventGroups, events can be placed in different banks.</p>
<h4 id="event"><a href="#event">Event</a></h4>
<p>The old Event class has been split into two classes: <a class="apilink" href="studio-api-eventdescription.html">Studio::EventDescription</a> and <a class="apilink" href="studio-api-eventinstance.html">Studio::EventInstance</a>. <a class="apilink" href="studio-api-eventdescription.html">Studio::EventDescription</a> holds the static data that describes an event, while <a class="apilink" href="studio-api-eventinstance.html">Studio::EventInstance</a> is a playable instance of an event. These two classes correspond to old Event objects retrieved by calling getEvent with or without the FMOD_EVENT_INFOONLY flag.</p>
<p>The FMOD Designer API used to create a fixed number of event instances when you first called getEvent without FMOD_EVENT_INFOONLY, whereas the Studio API creates a single instance each time you call <a class="apilink" href="studio-api-eventdescription.html#studio_eventdescription_createinstance">Studio::EventDescription::createInstance</a>. This gives you more control over the memory usage for each event.</p>
<h4 id="retrieving-events"><a href="#retrieving-events">Retrieving Events</a></h4>
<p>Events can be retrieved by ID (using <a class="apilink" href="studio-api-system.html#studio_system_geteventbyid">Studio::System::getEventByID</a>) or by path (using <a class="apilink" href="studio-api-system.html#studio_system_getevent">Studio::System::getEvent</a>).</p>
<p>Event IDs are <a href="glossary.html#guid">GUIDs (globally unique identifiers)</a>, and stay the same even if the event is renamed or moved around in the project. IDs can be parsed from a string using <a class="apilink" href="studio-api-common.html#studio_parseid">Studio::parseID</a>, or looked up from a path using <a class="apilink" href="studio-api-system.html#studio_system_lookupid">Studio::System::lookupID</a> if the "Master Bank.strings.bank" file is loaded.</p>
<p>Event paths consist of the string "event:/", followed by the the path to the event within the project's folder structure. To retrieve events by path, the "Master Bank.strings.bank" file must be loaded.</p>
<h4 id="eventparameter"><a href="#eventparameter">EventParameter</a></h4>
<p>There is no class analogous to the old EventParameter class. Instead use the parameter getting and setting functions in <a class="apilink" href="studio-api-eventinstance.html">Studio::EventInstance</a>: <a class="apilink" href="studio-api-eventinstance.html#studio_eventinstance_getparameterbyid">Studio::EventInstance::getParameterByID</a>, <a class="apilink" href="studio-api-eventinstance.html#studio_eventinstance_getparameterbyname">Studio::EventInstance::getParameterByName</a>, <a class="apilink" href="studio-api-eventinstance.html#studio_eventinstance_setparameterbyid">Studio::EventInstance::setParameterByID</a>, <a class="apilink" href="studio-api-eventinstance.html#studio_eventinstance_setparameterbyname">Studio::EventInstance::setParameterByName</a>, <a class="apilink" href="studio-api-eventinstance.html#studio_eventinstance_setparametersbyids">Studio::EventInstance::setParametersByIDs</a>.</p>
<h4 id="sustain-points-and-key-off"><a href="#sustain-points-and-key-off">Sustain Points and Key Off</a></h4>
<p>The old EventParameter class had a keyOff function to move past the next sustain point. In FMOD Studio and the Studio API, this behavior is implemented via a built-in KeyOff that can be triggered via <a class="apilink" href="studio-api-eventinstance.html#studio_eventinstance_keyoff">Studio::EventInstance::keyOff</a>.</p>
<h4 id="eventcategory"><a href="#eventcategory">EventCategory</a></h4>
<p>Event categories have been replaced in FMOD Studio by buses and VCAs, which provide much more functionality to the sound designer. In the Studio API, buses and VCAs are accessed via the <a class="apilink" href="studio-api-bus.html">Studio::Bus</a> and <a class="apilink" href="studio-api-vca.html">Studio::VCA</a> classes.</p>
<h4 id="eventreverb"><a href="#eventreverb">EventReverb</a></h4>
<p>The EventReverb class has been removed. Similar functionality can be implemented using events with <a href="glossary.html#automatic-parameter">automatic</a> distance parameters controlling reverb snapshots.</p>
<h4 id="eventqueue-and-eventqueueentry"><a href="#eventqueue-and-eventqueueentry">EventQueue and EventQueueEntry</a></h4>
<p>FMOD Studio doesn't have the concept of event queues.</p>
<h4 id="musicsystem-and-musicprompt"><a href="#musicsystem-and-musicprompt">MusicSystem and MusicPrompt</a></h4>
<p>Interactive music in FMOD Studio is implemented inside the event editor, so the MusicSystem and MusicPrompt classes have been removed.</p>
<h4 id="neteventsystem"><a href="#neteventsystem">NetEventSystem</a></h4>
<p>Whereas the old network tweaking API was implemented as a separate fmod_event_net library, the FMOD Studio live update system is built into the main API library, and can be enabled by passing <a class="apilink" href="studio-api-system.html#fmod_studio_init_liveupdate">FMOD_STUDIO_INIT_LIVEUPDATE</a> to <a class="apilink" href="studio-api-system.html#studio_system_initialize">Studio::System::initialize</a>.</p>
<h3 id="fmod-studios-core-api-versus-fmod-exs-core-api"><a href="#fmod-studios-core-api-versus-fmod-exs-core-api">10.8.2 FMOD Studio's Core API Versus FMOD Ex's Core API</a></h3>
<h4 id="no-more-recommended-startup-sequence"><a href="#no-more-recommended-startup-sequence">No more 'recommended startup sequence'</a></h4>
<p>The <a href="glossary.html#fmod-engine">FMOD Engine</a> now handles the speaker mode automatically. Starting the Core API is as simple as calling <a class="apilink" href="core-api-system.html#system_init">System::init</a>, and does not require querying caps or speaker modes to make the FMOD Engine's software <a href="glossary.html#mixer">mixer</a> match that of the operating system. If you want the software mixer to be forced into a certain speaker mode, disregarding the operating system, use <a class="apilink" href="core-api-system.html#system_setsoftwareformat">System::setSoftwareFormat</a>. The FMOD Engine will automatically <a href="glossary.html#down-mixing">downmix</a> or <a href="glossary.html#up-mixing">upmix</a> this mode if the user's system is not the same speaker mode as the one selected for the software engine. Where possible, Dolby or internal downmixing will be used to achieve better surround effect.</p>
<h4 id="added-new-dsp-effects"><a href="#added-new-dsp-effects">Added new DSP effects</a></h4>
<p>The following new <a href="glossary.html#dsp-effect">DSP effects</a> are added. (From fmod_dsp_effects.h)</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_DSP_TYPE_SEND</span><span class="p">,</span> <span class="cm">/* This unit sends a copy of the signal to a return DSP anywhere in the DSP tree. */</span>
<span class="n">FMOD_DSP_TYPE_RETURN</span><span class="p">,</span> <span class="cm">/* This unit receives signals from a number of send DSPs. */</span>
<span class="n">FMOD_DSP_TYPE_HIGHPASS_SIMPLE</span><span class="p">,</span> <span class="cm">/* This unit filters sound using a simple highpass with no resonance, but has flexible cutoff and is fast. Deprecated and will be removed in a future release (see FMOD_DSP_HIGHPASS_SIMPLE remarks for alternatives). */</span>
<span class="n">FMOD_DSP_TYPE_PAN</span><span class="p">,</span> <span class="cm">/* This unit pans the signal, possibly upmixing or downmixing as well. */</span>
<span class="n">FMOD_DSP_TYPE_THREE_EQ</span><span class="p">,</span> <span class="cm">/* This unit is a three-band equalizer. */</span>
<span class="n">FMOD_DSP_TYPE_FFT</span><span class="p">,</span> <span class="cm">/* This unit simply analyzes the signal and provides spectrum information back through getParameter. */</span>
<span class="n">FMOD_DSP_TYPE_LOUDNESS_METER</span><span class="p">,</span> <span class="cm">/* This unit analyzes the loudness and true peak of the signal. */</span>
<span class="n">FMOD_DSP_TYPE_ENVELOPEFOLLOWER</span><span class="p">,</span> <span class="cm">/* This unit tracks the envelope of the input/sidechain signal. Format to be publicly disclosed soon. */</span>
<span class="n">FMOD_DSP_TYPE_CONVOLUTIONREVERB</span><span class="p">,</span> <span class="cm">/* This unit implements convolution reverb. */</span>
<span class="n">FMOD_DSP_TYPE_CHANNELMIX</span><span class="p">,</span> <span class="cm">/* This unit provides per signal channel gain, and output channel mapping to allow 1 multi-channel signal made up of many groups of signals to map to a single output signal. */</span>
<span class="n">FMOD_DSP_TYPE_TRANSCEIVER</span><span class="p">,</span> <span class="cm">/* This unit &#39;sends&#39; and &#39;receives&#39; from a selection of up to 32 different slots. It is like a send/return but it uses global slots rather than returns as the destination. It also has other features. Multiple transceivers can receive from a single channel, or multiple transceivers can send to a single channel, or a combination of both. */</span>
<span class="n">FMOD_DSP_TYPE_OBJECTPAN</span><span class="p">,</span> <span class="cm">/* This unit sends the signal to a 3d object encoder like Dolby Atmos. Supports a subset of the FMOD_DSP_TYPE_PAN parameters. */</span>
<span class="n">FMOD_DSP_TYPE_MULTIBAND_EQ</span><span class="p">,</span> <span class="cm">/* This unit is a flexible five band parametric equalizer. */</span>
</pre></div>
<p>FMOD's <a href="effects-reference.html#convolution-reverb">convolution reverb</a> also has the option to be GPU accelerated for big performance wins.</p>
<h4 id="new-file-format-support"><a href="#new-file-format-support">New file format support</a></h4>
<p><a class="apilink" href="core-api-sound.html#fmod_sound_type_fadpcm">FMOD_SOUND_TYPE_FADPCM</a> is a new highly optimized, branchless ADPCM variant which has higher quality than IMA ADPCM, and better performance. Great for mobiles.</p>
<h4 id="dolby-atmos-support"><a href="#dolby-atmos-support">Dolby Atmos support</a></h4>
<p>Through the <a href="effects-reference.html#object-panner">FMOD object panner</a>, sounds can be positioned spherically in 3d space to support Dolby Atmos. This includes height speakers.</p>
<h4 id="new-dsp-mixing-engine"><a href="#new-dsp-mixing-engine">New DSP mixing engine</a></h4>
<p>The FMOD Engine's software mixing engine is more flexible than that of FMOD Ex, with support for changing channel formats and speaker modes as the signal flows through the mix. The FMOD Engine's software mixing engine also has better custom DSP support, with branch idling, silence detection, sends and returns, side-chaining, circular connections and more.</p>
<h4 id="added-plug-in-info-helper-function"><a href="#added-plug-in-info-helper-function">Added plug-in info helper function</a></h4>
<p><a class="apilink" href="core-api-system.html#system_getdspinfobyplugin">System::getDSPInfoByPlugin</a> has been added to plug the gap between loading a plug-in, and getting its <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_description">FMOD_DSP_DESCRIPTION</a> structure so that it can be passed to <a class="apilink" href="core-api-system.html#system_createdsp">System::createDSP</a>.</p>
<h4 id="added-background-suspension-support"><a href="#added-background-suspension-support">Added background suspension support</a></h4>
<p>For mobile devices, <a class="apilink" href="core-api-system.html#system_mixersuspend">System::mixerSuspend</a> and <a class="apilink" href="core-api-system.html#system_mixerresume">System::mixerResume</a> allows you to halt FMOD's <a href="glossary.html#mixer">cpu mixer</a> and thread before sleeping or answering a call or any other interruption event.</p>
<h4 id="channelgroups-volume-and-panning-are-now-dsp-based-rather-than-reaching-down-to-the-channels-of-the-child-channelgroups"><a href="#channelgroups-volume-and-panning-are-now-dsp-based-rather-than-reaching-down-to-the-channels-of-the-child-channelgroups">ChannelGroups volume and panning are now DSP based, rather than reaching down to the Channels of the child ChannelGroups.</a></h4>
<p>ChannelGroups in FMOD Ex were a way to scale and modify the pan and volume of the <a class="apilink" href="core-api-channel.html">Channel</a>s in the <a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a>s below. The <a href="glossary.html#fmod-engine">FMOD Engine</a> now modifies pan and volume on a <a href="glossary.html#dsp">DSP</a> basis using the <a href="effects-reference.html#fader">fader DSP unit</a>. A fader unit can be repositioned in a channel group's <a href="glossary.html#effect">effect</a> list, allowing effects to be either post- or pre-fader effects.</p>
<h4 id="added-additional-output-streams"><a href="#added-additional-output-streams">Added additional output streams</a></h4>
<p><a class="apilink" href="core-api-system.html#system_attachchannelgrouptoport">System::attachChannelGroupToPort</a> and <a class="apilink" href="core-api-system.html#system_detachchannelgroupfromport">System::detachChannelGroupFromPort</a> allows signals to be sent to alternate sound outputs like headsets, controllers with speakers, and console based multi speaker arrays that are not the standard surround sound speaker output.</p>
<h4 id="added-sound-helper-function"><a href="#added-sound-helper-function">Added Sound helper function</a></h4>
<p>Added the ability for a child sound (subsound) to query for its parent via <a class="apilink" href="core-api-sound.html#sound_getsubsoundparent">Sound::getSubSoundParent</a>.</p>
<h4 id="added-sample-volume-control"><a href="#added-sample-volume-control">Added sample volume control</a></h4>
<p><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_addfadepoint">ChannelControl::addFadePoint</a>, <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_removefadepoints">ChannelControl::removeFadePoints</a> and <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getfadepoints">ChannelControl::getFadePoints</a> give the ability to set up a volume fade or ramp between any 2 clock points is possible. Link up multiple fade points to create envelopes. All fading is clock accurate and compensated for when pitch is changed. <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setvolumeramp">ChannelControl::setVolumeRamp</a> / <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getvolumeramp">ChannelControl::getVolumeRamp</a> can be used when queuing sounds up and for other reasons, it can be desirable to turn off ramping of volume changes, so the ability has been added to turn volume ramping (declicking) off or on per <a class="apilink" href="core-api-channel.html">Channel</a>/<a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a>.</p>
<h4 id="added-utf8-support"><a href="#added-utf8-support">Added UTF8 support</a></h4>
<p>Functions such as System::getDriverInfoW have been removed in favour of UTF8 support.</p>
<h4 id="added-concept-of-a-fader-dsp-per-channel-and-channelgroup"><a href="#added-concept-of-a-fader-dsp-per-channel-and-channelgroup">Added concept of a 'fader' DSP per Channel and ChannelGroup</a></h4>
<p>Each <a class="apilink" href="core-api-channel.html">Channel</a> and <a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a> has a built in 'fader' (<a class="apilink" href="core-api-common-dsp-effects.html#fmod_dsp_type_fader">FMOD_DSP_TYPE_FADER</a>). This also acts as the <a href="glossary.html#dsp">DSP</a> 'head' of the <a class="apilink" href="core-api-channel.html">Channel</a> or <a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a> by default.<br />
This can of course be changed later. If you add an <a href="glossary.html#effect">effect</a>, you can position it to be the head, and the fader will be before that in the <a href="glossary.html#signal">signal</a> chain.<br />
A fader DSP simply adjusts volume of the signal for a mix, and also supports sample accurate volume fade points, for envelopes and fade ins / fade outs.<br />
A panner is a separate entity which can pan a sound in mono, stereo and surround using a variety of parameters including position/direction/extent/rotation/axis control and 3d position control.<br />
The order of processing of a fader and panner can be controlled using <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setdspindex">ChannelControl::setDSPIndex</a>, and it can be positioned into an effect chain so that panning comes before an effect or after, with fading coming at a different position in the effect chain.</p>
<h4 id="new-dspconnection-types-supported"><a href="#new-dspconnection-types-supported">New DSPConnection types supported</a></h4>
<p><a class="apilink" href="core-api-dsp.html#dsp_addinput">DSP::addInput</a> now has a new optional <span class="dead-link" href="glossary.html#parameter">parameter</span class="dead-link"> to describe the connection's behavior between two DSP units. <a class="apilink" href="core-api-dspconnection.html#fmod_dspconnection_type">FMOD_DSPCONNECTION_TYPE</a> has been added to tell an input DSP that it should mix to a 'sidechain' buffer, which is a special buffer for DSP units that want to process a sidechain (for example a compressor) through a DSP unit's <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_state">FMOD_DSP_STATE</a> structure. This signal is not audible but is used to affect behavior within the DSP. <a class="apilink" href="core-api-dspconnection.html#fmod_dspconnection_type_sidechain">FMOD_DSPCONNECTION_TYPE_SIDECHAIN</a> would be used here.<br />
It should only consume existing data, not execute the input to generate that data. <a class="apilink" href="core-api-dspconnection.html#fmod_dspconnection_type_send">FMOD_DSPCONNECTION_TYPE_SEND</a> would be used here. This can be useful for graph dependency reasons, so that an input is not executed before it should be.</p>
<h4 id="new-dsp-parameter-types"><a href="#new-dsp-parameter-types">New DSP parameter types</a></h4>
<p>In FMOD Ex, only float parameters were supported. Now Int, Bool and Data parameters are supported. <br />
Use:</p>
<ul>
<li><a class="apilink" href="core-api-dsp.html#dsp_setparameterfloat">DSP::setParameterFloat</a>, <a class="apilink" href="core-api-dsp.html#dsp_getparameterfloat">DSP::getParameterFloat</a></li>
<li><a class="apilink" href="core-api-dsp.html#dsp_setparameterint">DSP::setParameterInt</a>, <a class="apilink" href="core-api-dsp.html#dsp_getparameterint">DSP::getParameterInt</a></li>
<li><a class="apilink" href="core-api-dsp.html#dsp_setparameterbool">DSP::setParameterBool</a>, <a class="apilink" href="core-api-dsp.html#dsp_getparameterbool">DSP::getParameterBool</a></li>
<li><a class="apilink" href="core-api-dsp.html#dsp_setparameterdata">DSP::setParameterData</a>, <a class="apilink" href="core-api-dsp.html#dsp_getparameterdata">DSP::getParameterData</a></li>
</ul>
<h4 id="fmod_hardware-support"><a href="#fmod_hardware-support">FMOD_HARDWARE support</a></h4>
<p>The FMOD Engine's software mixing is sufficiently advanced that it can do things that would be impossible with the limited features of hardware voices. Today, when multicore processors are common even on mobile platforms, hardware voice support provides no real advantage; not when the FMOD Engine can be faster, better quality, and more flexible. As such, all sounds and voices handled by the FMOD Engine are software mixed.</p>
<p>API changes:</p>
<ul>
<li>System::setHardwareChannels is removed</li>
<li>System::getDriverCaps is removed. systemrate, speakermode, speakermodechannels parameters have been added to <a class="apilink" href="core-api-system.html#system_getdriverinfo">System::getDriverInfo</a> to provide the information which may be important to the developer. Similarly, System::getRecordDriverCaps has been removed, in favour of <a class="apilink" href="core-api-system.html#system_getrecorddriverinfo">System::getRecordDriverInfo</a>.</li>
<li>System::setSpeakerMode and System::getSpeakerMode are removed, and instead are now moved into <a class="apilink" href="core-api-system.html#system_setsoftwareformat">System::setSoftwareFormat</a> because 'speakermode' now only affects the internal mixer, and the operating system speaker mode is matched at runtime through matrix upmixing or downmixing (automatically).</li>
</ul>
<h4 id="channels-and-channelgroups-have-been-merged-into-channelcontrol"><a href="#channels-and-channelgroups-have-been-merged-into-channelcontrol">Channels and ChannelGroups have been merged into 'ChannelControl'</a></h4>
<p><a class="apilink" href="core-api-channel.html">Channel</a>s and <a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a>s had some similar functionality in FMOD Ex (ie setVolume, setPaused), but the FMOD Engine takes it even further. The FMOD Engine is designed so that <a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a>s can have a lot more control, including allowing pausing and muting at the DSP node level, adding effects, and positioning in 3D.</p>
<h4 id="converting-fmod-reverb-parameters"><a href="#converting-fmod-reverb-parameters">Converting FMOD Reverb parameters</a></h4>
<p>The FMOD Engine handles reverb parameters differently to FMOD Ex. Use this table to convert from FMOD Ex parameters to FMOD Engine parameters.</p>
<table>
<thead>
<tr>
<th>FMOD Engine property</th>
<th align="center">Range</th>
<th>FMOD Ex property / conversion formula to create FMOD Engine value</th>
</tr>
</thead>
<tbody>
<tr>
<td>DecayTime (ms)</td>
<td align="center">100 to 20000</td>
<td>DecayTime * 1000</td>
</tr>
<tr>
<td>EarlyDelay (ms)</td>
<td align="center">0 to 300</td>
<td>ReflectionsDelay * 1000</td>
</tr>
<tr>
<td>LateDelay (ms)</td>
<td align="center">0 to 100</td>
<td>ReverbDelay * 1000</td>
</tr>
<tr>
<td>HFReference (Hz)</td>
<td align="center">20 to 20000</td>
<td>HFReference</td>
</tr>
<tr>
<td>HFDecayRatio (%)</td>
<td align="center">0 to 100</td>
<td>DecayHFRatio * 100</td>
</tr>
<tr>
<td>Diffusion (%)</td>
<td align="center">0 to 100</td>
<td>Diffusion</td>
</tr>
<tr>
<td>Density (%)</td>
<td align="center">0 to 100</td>
<td>Density</td>
</tr>
<tr>
<td>LowShelfFrequency (Hz)</td>
<td align="center">20 to 1000</td>
<td>LFReference</td>
</tr>
<tr>
<td>LowShelfGain (dB)</td>
<td align="center">-48 to 12</td>
<td>RoomLF / 100</td>
</tr>
<tr>
<td>HighCut (Hz)</td>
<td align="center">20 to 20000</td>
<td>IF RoomHF &lt; 0 THEN HFReference / sqrt((1-HFGain) / HFGain) ELSE 20000</td>
</tr>
<tr>
<td>EarlyLateMix (%)</td>
<td align="center">0 to 100</td>
<td>IF Reflections &gt; -10000 THEN LateEarlyRatio/(LateEarlyRatio + 1) * 100 ELSE 100</td>
</tr>
<tr>
<td>WetLevel (dB)</td>
<td align="center">-80 to 20</td>
<td>10 * log10(EarlyAndLatePower) + Room / 100</td>
</tr>
</tbody>
</table>
<p>Note: Clamp all values to maximum (after conversion) as some conversions may exceed the new parameter range.</p>
<table>
<thead>
<tr>
<th>Intermediate variables used in conversion</th>
<th>Formulas</th>
</tr>
</thead>
<tbody>
<tr>
<td>LateEarlyRatio</td>
<td>pow(10, (Reverb - Reflections) / 2000)</td>
</tr>
<tr>
<td>EarlyAndLatePower</td>
<td>pow(10, Reflections / 1000) + pow(10, Reverb / 1000)</td>
</tr>
<tr>
<td>HFGain</td>
<td>pow(10, RoomHF / 2000)</td>
</tr>
</tbody>
</table>
<h4 id="system_set3dspeakerposition-renamed"><a href="#system_set3dspeakerposition-renamed">System::set3DSpeakerPosition renamed</a></h4>
<p><a class="apilink" href="core-api-system.html#system_setspeakerposition">System::setSpeakerPosition</a> is a minor name change to denote that 3d and 2d positioning is affected by speaker location.</p>
<h4 id="fmod_channel_free-fmod_channel_reuse-removed-default-channelgroup-now-passed-to-playsound-if-needed"><a href="#fmod_channel_free-fmod_channel_reuse-removed-default-channelgroup-now-passed-to-playsound-if-needed">FMOD_CHANNEL_FREE / FMOD_CHANNEL_REUSE removed. Default ChannelGroup now passed to playSound if needed</a></h4>
<p><a class="apilink" href="core-api-system.html#system_playsound">System::playSound</a> and <a class="apilink" href="core-api-system.html#system_playdsp">System::playDSP</a> now do not take a 'channel' parameter. All channels behave the same way as FMOD_CHANNEL_FREE would have in FMOD Ex.<br />
Seeing as a parameter was removed from playSound/playDSP, a new one was added to remove the overhead of disconnecting and reconnecting DSP graph nodes after playSound was called, so that they could be hooked up to a new ChannelGroup other than the master ChannelGroup. Consider this addition a performance optimization, and a simplification in API calls.</p>
<h4 id="cdrom-cdda-support-removed"><a href="#cdrom-cdda-support-removed">CDROM / CDDA support removed</a></h4>
<p>Legacy support for CDROM redbook audio playback has been removed due to lack of interest and issues with maintaining said code.</p>
<h4 id="system_getspectrum-and-system_getwavedata-removed"><a href="#system_getspectrum-and-system_getwavedata-removed">System::getSpectrum and System::getWaveData removed</a></h4>
<p>Add a custom DSP unit to capture DSP wavedata from the output stage. Use the master <a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a>'s DSP head with <a class="apilink" href="core-api-system.html#system_getmasterchannelgroup">System::getMasterChannelGroup</a> and <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getdsp">ChannelControl::getDSP</a>.<br />
Add a built in <a href="effects-reference.html#fft">FFT DSP unit</a> type to capture spectrum data from the output stage. Create a built in FFT unit with <a class="apilink" href="core-api-system.html#system_createdspbytype">System::createDSPByType</a> and <a class="apilink" href="core-api-common-dsp-effects.html#fmod_dsp_type_fft">FMOD_DSP_TYPE_FFT</a>, then add the effect to the master <a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a> with <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_adddsp">ChannelControl::addDSP</a>. Use <a class="apilink" href="core-api-dsp.html#dsp_getparameterdata">DSP::getParameterData</a> to get the raw spectrum data or use <a class="apilink" href="core-api-dsp.html#dsp_getparameterfloat">DSP::getParameterFloat</a> to get the dominant frequency from the signal.</p>
<h4 id="w-function-wide-char-support-removed"><a href="#w-function-wide-char-support-removed">'W' function wide char support removed</a></h4>
<p>Functions such as System::getDriverInfoW have been removed in favour of UTF8 support.</p>
<h4 id="system_setreverbambientproperties-removed"><a href="#system_setreverbambientproperties-removed">System::setReverbAmbientProperties removed</a></h4>
<p>The 'background' ambient reverb for a 3d reverb system is now just the standard reverb set with <a class="apilink" href="core-api-system.html#system_setreverbproperties">System::setReverbProperties</a>.</p>
<h4 id="system_getdspclock-removed"><a href="#system_getdspclock-removed">System::getDSPClock removed</a></h4>
<p>Use the <a href="glossary.html#dsp-clock">DSP clock</a> of the master <a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a> instead with <a class="apilink" href="core-api-system.html#system_getmasterchannelgroup">System::getMasterChannelGroup</a> and <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getdspclock">ChannelControl::getDSPClock</a>.</p>
<h4 id="getmemoryinfo-functions-have-been-removed-from-all-classes"><a href="#getmemoryinfo-functions-have-been-removed-from-all-classes">getMemoryInfo functions have been removed from all classes</a></h4>
<p>Due to the unreliability of the function in FMOD Ex due to caching, threads, and shared memory throwing results out, the function has been removed. Alternate memory tracking methods will be added later. FMOD::Memory_GetStats and logging is the best way to track memory at the moment.</p>
<h4 id="sound_setvariations-and-sound_getvariations-have-been-removed"><a href="#sound_setvariations-and-sound_getvariations-have-been-removed">Sound::setVariations and Sound::getVariations have been removed</a></h4>
<p>Due to this being a 'helper' function that can easily be achieved in user code, this was deemed not necessary and removed.</p>
<h4 id="sound_setsubsoundsentence-has-been-removed"><a href="#sound_setsubsoundsentence-has-been-removed">Sound::setSubSoundSentence has been removed</a></h4>
<p>This function has been removed in favour of the extremely precise and more reliable <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setdelay">ChannelControl::setDelay</a> functionality. 2 or more sounds can be queued up to play end to end using this function, with the added benefit of cross fades and overlaps.</p>
<h4 id="setdelay-and-clock-functions-now-use-64bit-long-long-type-rather-than-than-32bit-hi-and-32bit-low-part-parameters"><a href="#setdelay-and-clock-functions-now-use-64bit-long-long-type-rather-than-than-32bit-hi-and-32bit-low-part-parameters">setDelay and clock functions now use 64bit 'long long' type rather than than 32bit hi and 32bit low part parameters.</a></h4>
<p>Due to the complexity of working in fixed point, and seeing as there is a consistent 64bit type for all compilers in long long that FMOD supports, we have switched to this type.<br />
1 32bit value would wrap around in 24 hours at 48khz, so 64bit values will last for 12 million years which should be enough to avoid in game clock wrap around.</p>
<h4 id="channel_setspeakermix-channel_setspeakerlevels-channel_setinputchannelmix-channel_getpan-channel_getspeakermix-and-channel_getspeakerlevels-removed"><a href="#channel_setspeakermix-channel_setspeakerlevels-channel_setinputchannelmix-channel_getpan-channel_getspeakermix-and-channel_getspeakerlevels-removed">Channel::setSpeakerMix, Channel::setSpeakerLevels, Channel::setInputChannelMix, Channel::getPan, Channel::getSpeakerMix and Channel::getSpeakerLevels removed</a></h4>
<p>A cleaner replacement has been made for these functions,</p>
<ul>
<li><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setmixlevelsoutput">ChannelControl::setMixLevelsOutput</a> (float frontleft, float frontright, float center, float lfe, float surroundleft, float surroundright, float backleft, float backright);</li>
<li><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setmixlevelsinput">ChannelControl::setMixLevelsInput</a> (float *levels, int numlevels);</li>
<li><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setmixmatrix">ChannelControl::setMixMatrix</a> (float *matrix, int outchannels, int inchannels, int inchannel_hop = 0);</li>
<li><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getmixmatrix">ChannelControl::getMixMatrix</a> (float <em>matrix, int </em>outchannels, int *inchannels, int inchannel_hop = 0);</li>
</ul>
<p>Note that because setPan, setMixLevelsOutput and setMixLevelsInput all affect a final pan matrix, only getMixMatrix is available as the 'getter'. There is no more exclusive mode for the panning technique like there was in FMOD Ex. All 3 functions can now affect the final matrix. The setMixMatrix function now allows instant setting of a full matrix for performance reasons, rather than calling setSpeakerLevels each time for each speaker.</p>
<h4 id="dspconnection_setlevelsgetlevels-have-been-removed"><a href="#dspconnection_setlevelsgetlevels-have-been-removed">DSPConnection::setLevels/getLevels have been removed.</a></h4>
<p>As above, new functionality is available to produce the same result. Rather than setting output levels row by row, a full 2 dimensional matrix is supplied with <a class="apilink" href="core-api-dspconnection.html#dspconnection_setmixmatrix">DSPConnection::setMixMatrix</a>.</p>
<h4 id="channel_set3dpanlevel-misnomer-renamed"><a href="#channel_set3dpanlevel-misnomer-renamed">Channel::set3DPanLevel misnomer renamed</a></h4>
<p>The FMOD Ex function did not actually only affect pan, it also affected doppler and distance attenuation so to call it 'pan' level was not really correct. THe FMOD Engine corrects this with <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_set3dlevel">ChannelControl::set3DLevel</a>.</p>
<h4 id="override-functions-removed-from-channelgroup-class"><a href="#override-functions-removed-from-channelgroup-class">'override' functions removed from ChannelGroup class</a></h4>
<p>Because volume/pitch/muting/reverb properties and pausing has been added as a <a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a> concept at the DSP level, <a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a>s no longer rely on their 'channels' to do pausing and muting type logic. The <a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a>'s DSP itself will directly mute/pause etc, thanks to the removal of FMOD_HARDWARE support.</p>
<h4 id="system_adddsp-removed-from-the-system-api"><a href="#system_adddsp-removed-from-the-system-api">System::addDSP removed from the System API</a></h4>
<p>Rather than using the 'system' to add a DSP to, the user must use <a class="apilink" href="core-api-system.html#system_getmasterchannelgroup">System::getMasterChannelGroup</a> which gets the top level <a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a>, then use <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_adddsp">ChannelControl::addDSP</a> to add the DSP to it, which effectively puts at the end of the signal chain.</p>
<h4 id="dsp_remove-removed-from-the-dsp-api"><a href="#dsp_remove-removed-from-the-dsp-api">DSP::remove removed from the DSP API</a></h4>
<p>Effects that are added with <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_adddsp">ChannelControl::addDSP</a> are owned by the ChannelControl that added it, and therefore must be removed with <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_removedsp">ChannelControl::removeDSP</a>, instead of having the DSP removing itself. This helps the <a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a> or <a class="apilink" href="core-api-channel.html">Channel</a> manage resources.</p></div>
<p class="manual-footer">FMOD Engine User Manual 2.03.13 (2026-03-31). &copy; 2026 Firelight Technologies Pty Ltd.</p>
</div>
</body>
</html>
@@ -0,0 +1,814 @@
<html>
<head>
<title>Core API Reference | Channel</title>
<link rel="stylesheet" href="style/docs.css">
<link rel="stylesheet" href="style/code_highlight.css">
<script type="text/javascript" src="scripts/language-selector.js"></script></head>
<body>
<div class="docs-body">
<div class="manual-toc">
<p>FMOD Engine User Manual 2.03</p>
<ul>
<li><a href="welcome.html">Welcome to the FMOD Engine</a></li>
<li><a href="core-api-concepts.html">Core API Key Concepts</a></li>
<li><a href="running-the-core-api.html">Core API Getting Started</a></li>
<li><a href="loading-and-playing-sounds-in-the-core-api.html">Core API Loading and Playing Sounds</a></li>
<li><a href="spatializing-sounds-in-the-core-api.html">Core API Spatializing Sounds</a></li>
<li><a href="mixing-and-routing-in-the-core-api.html">Core API Mixing and Routing</a></li>
<li><a href="using-dsp-effects-in-the-core-api.html">Core API Using DSP Effects</a></li>
<li><a href="effects-reference.html">Core API Effect Reference</a></li>
<li><a href="managing-resources-in-the-core-api.html">Core API Managing Resources</a></li>
<li><a href="advanced-core-api-topics.html">Core API Advanced Topics</a></li>
<li class="manual-current-chapter manual-inactive-chapter"><a href="core-api.html">Core API Reference</a><ul class="subchapters"><li><a href="core-api-common.html">Common</a></li><li><a href="core-api-common-dsp-effects.html">Effect Parameters</a></li><li><a href="core-api-system.html">System</a></li><li><a href="core-api-sound.html">Sound</a></li><li><a href="core-api-channelcontrol.html">ChannelControl</a></li><li class="manual-current-chapter manual-active-chapter"><a href="core-api-channel.html">Channel</a></li><li><a href="core-api-channelgroup.html">ChannelGroup</a></li><li><a href="core-api-soundgroup.html">SoundGroup</a></li><li><a href="core-api-dsp.html">DSP</a></li><li><a href="core-api-dspconnection.html">DSPConnection</a></li><li><a href="core-api-geometry.html">Geometry</a></li><li><a href="core-api-reverb3d.html">Reverb3D</a></li><li><a href="core-api-platform-ios.html">iOS Specific</a></li><li><a href="core-api-platform-android.html">Android Specific</a></li><li><a href="core-api-platform-html5.html">HTML5 Specific</a></li></ul></li>
<li><a href="studio-api-getting-started.html">Studio API Getting Started</a></li>
<li><a href="studio-guide.html">Studio API Guide</a></li>
<li><a href="studio-api-3d-events.html">Studio API 3D Events</a></li>
<li><a href="studio-api-threads.html">Studio API Threads</a></li>
<li><a href="studio-api.html">Studio API Reference</a></li>
<li><a href="platforms.html">Platform Details</a></li>
<li><a href="dsp-plugin-api-guide.html">Plug-in DSP API Guide</a></li>
<li><a href="plugin-api.html">Plug-in API Reference</a></li>
<li><a href="fsbank-api.html">FSBank API Reference</a></li>
<li><a href="troubleshooting.html">Troubleshooting</a></li>
<li><a href="glossary.html">Glossary</a></li>
</ul>
</div>
<div class="manual-content api">
<h1>11. Core API Reference | Channel</h1>
<p>A source of <a href="glossary.html#signal">audio signal</a> that connects to the <a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a> mixing hierarchy.</p>
<p>Create with <a class="apilink" href="core-api-system.html#system_playsound">System::playSound</a> or <a class="apilink" href="core-api-system.html#system_playdsp">System::playDSP</a>.</p>
<p><strong>Playback control:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-channel.html#channel_setfrequency" title="Sets the frequency or playback rate.">Channel::setFrequency</a> Sets the frequency or playback rate.</span></li>
<li><span><a class="apilink" href="core-api-channel.html#channel_getfrequency" title="Retrieves the playback frequency or playback rate.">Channel::getFrequency</a> Retrieves the playback frequency or playback rate.</span></li>
<li><span><a class="apilink" href="core-api-channel.html#channel_setpriority" title="Sets the priority used for virtual voice ordering.">Channel::setPriority</a> Sets the priority used for virtual voice ordering.</span></li>
<li><span><a class="apilink" href="core-api-channel.html#channel_getpriority" title="Retrieves the priority used for virtual voice ordering.">Channel::getPriority</a> Retrieves the priority used for virtual voice ordering.</span></li>
<li><span><a class="apilink" href="core-api-channel.html#channel_setposition" title="Sets the current playback position.">Channel::setPosition</a> Sets the current playback position.</span></li>
<li><span><a class="apilink" href="core-api-channel.html#channel_getposition" title="Retrieves the current playback position.">Channel::getPosition</a> Retrieves the current playback position.</span></li>
<li><span><a class="apilink" href="core-api-channel.html#channel_setchannelgroup" title="Sets the ChannelGroup this object outputs to.">Channel::setChannelGroup</a> Sets the ChannelGroup this object outputs to.</span></li>
<li><span><a class="apilink" href="core-api-channel.html#channel_getchannelgroup" title="Retrieves the ChannelGroup this object outputs to.">Channel::getChannelGroup</a> Retrieves the ChannelGroup this object outputs to.</span></li>
<li><span><a class="apilink" href="core-api-channel.html#channel_setloopcount" title="Sets the number of times to loop before stopping.">Channel::setLoopCount</a> Sets the number of times to loop before stopping.</span></li>
<li><span><a class="apilink" href="core-api-channel.html#channel_getloopcount" title="Retrieves the number of times to loop before stopping.">Channel::getLoopCount</a> Retrieves the number of times to loop before stopping.</span></li>
<li><span><a class="apilink" href="core-api-channel.html#channel_setlooppoints" title="Sets the loop start and end points.">Channel::setLoopPoints</a> Sets the loop start and end points.</span></li>
<li><span><a class="apilink" href="core-api-channel.html#channel_getlooppoints" title="Retrieves the loop start and end points.">Channel::getLoopPoints</a> Retrieves the loop start and end points.</span></li>
</ul>
<p><strong>Information:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-channel.html#channel_isvirtual" title="Retrieves whether the Channel is being emulated by the virtual voice system.">Channel::isVirtual</a> Retrieves whether the Channel is being emulated by the virtual voice system.</span></li>
<li><span><a class="apilink" href="core-api-channel.html#channel_getcurrentsound" title="Retrieves the currently playing Sound.">Channel::getCurrentSound</a> Retrieves the currently playing Sound.</span></li>
<li><span><a class="apilink" href="core-api-channel.html#channel_getindex" title="Retrieves the index of this object in the System Channel pool.">Channel::getIndex</a> Retrieves the index of this object in the System Channel pool.</span></li>
</ul>
<p>The following APIs are inherited from <a class="apilink" href="core-api-channelcontrol.html">ChannelControl</a>:</p>
<p><strong>Playback:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_isplaying" title="Retrieves the playing state.">ChannelControl::isPlaying</a> Retrieves the playing state.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_stop" title="Stops the Channel (or all Channels in nested ChannelGroups) from playing.">ChannelControl::stop</a> Stops the Channel (or all Channels in nested ChannelGroups) from playing.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setpaused" title="Sets the paused state.">ChannelControl::setPaused</a> Sets the paused state.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getpaused" title="Retrieves the paused state.">ChannelControl::getPaused</a> Retrieves the paused state.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setmode" title="Sets the playback mode that controls how this object behaves.">ChannelControl::setMode</a> Sets the playback mode that controls how this object behaves.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getmode" title="Retrieves the playback mode bits that control how this object behaves.">ChannelControl::getMode</a> Retrieves the playback mode bits that control how this object behaves.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setpitch" title="Sets the relative pitch / playback rate.">ChannelControl::setPitch</a> Sets the relative pitch / playback rate.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getpitch" title="Retrieves the relative pitch / playback rate.">ChannelControl::getPitch</a> Retrieves the relative pitch / playback rate.</span></li>
</ul>
<p><strong>Volume levels:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getaudibility" title="Gets the calculated audibility based on all attenuation factors which contribute to the final output volume.">ChannelControl::getAudibility</a> Gets the calculated audibility based on all attenuation factors which contribute to the final output volume.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setvolume" title="Sets the volume level.">ChannelControl::setVolume</a> Sets the volume level.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getvolume" title="Retrieves the volume level.">ChannelControl::getVolume</a> Retrieves the volume level.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setvolumeramp" title="Sets whether volume changes are ramped or instantaneous.">ChannelControl::setVolumeRamp</a> Sets whether volume changes are ramped or instantaneous.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getvolumeramp" title="Retrieves whether volume changes are ramped or instantaneous.">ChannelControl::getVolumeRamp</a> Retrieves whether volume changes are ramped or instantaneous.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setmute" title="Sets the mute state.">ChannelControl::setMute</a> Sets the mute state.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getmute" title="Retrieves the mute state.">ChannelControl::getMute</a> Retrieves the mute state.</span></li>
</ul>
<p><strong>Spatialization:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_set3dattributes" title="Sets the 3D position and velocity used to apply panning, attenuation and doppler.">ChannelControl::set3DAttributes</a> Sets the 3D position and velocity used to apply panning, attenuation and doppler.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_get3dattributes" title="Retrieves the 3D position and velocity used to apply panning, attenuation and doppler.">ChannelControl::get3DAttributes</a> Retrieves the 3D position and velocity used to apply panning, attenuation and doppler.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_set3dconeorientation" title="Sets the orientation of a 3D cone shape, used for simulated occlusion.">ChannelControl::set3DConeOrientation</a> Sets the orientation of a 3D cone shape, used for simulated occlusion.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_get3dconeorientation" title="Retrieves the orientation of a 3D cone shape, used for simulated occlusion.">ChannelControl::get3DConeOrientation</a> Retrieves the orientation of a 3D cone shape, used for simulated occlusion.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_set3dconesettings" title="Sets the angles and attenuation levels of a 3D cone shape, for simulated occlusion which is based on direction.">ChannelControl::set3DConeSettings</a> Sets the angles and attenuation levels of a 3D cone shape, for simulated occlusion which is based on direction.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_get3dconesettings" title="Retrieves the angles and attenuation levels of a 3D cone shape, for simulated occlusion which is based on direction.">ChannelControl::get3DConeSettings</a> Retrieves the angles and attenuation levels of a 3D cone shape, for simulated occlusion which is based on direction.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_set3dcustomrolloff" title="Sets a custom roll-off shape for 3D distance attenuation.">ChannelControl::set3DCustomRolloff</a> Sets a custom roll-off shape for 3D distance attenuation.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_get3dcustomrolloff" title="Retrieves the current custom roll-off shape for 3D distance attenuation.">ChannelControl::get3DCustomRolloff</a> Retrieves the current custom roll-off shape for 3D distance attenuation.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_set3ddistancefilter" title="Sets an override value for the 3D distance filter.">ChannelControl::set3DDistanceFilter</a> Sets an override value for the 3D distance filter.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_get3ddistancefilter" title="Retrieves the override values for the 3D distance filter.">ChannelControl::get3DDistanceFilter</a> Retrieves the override values for the 3D distance filter.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_set3ddopplerlevel" title="Sets the amount by which doppler is scaled.">ChannelControl::set3DDopplerLevel</a> Sets the amount by which doppler is scaled.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_get3ddopplerlevel" title="Retrieves the amount by which doppler is scaled.">ChannelControl::get3DDopplerLevel</a> Retrieves the amount by which doppler is scaled.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_set3dlevel" title="Sets the blend between 3D panning and 2D panning.">ChannelControl::set3DLevel</a> Sets the blend between 3D panning and 2D panning.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_get3dlevel" title="Retrieves the blend between 3D panning and 2D panning.">ChannelControl::get3DLevel</a> Retrieves the blend between 3D panning and 2D panning.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_set3dminmaxdistance" title="Sets the minimum and maximum distances used to calculate the 3D roll-off attenuation.">ChannelControl::set3DMinMaxDistance</a> Sets the minimum and maximum distances used to calculate the 3D roll-off attenuation.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_get3dminmaxdistance" title="Retrieves the minimum and maximum distances used to calculate the 3D roll-off attenuation.">ChannelControl::get3DMinMaxDistance</a> Retrieves the minimum and maximum distances used to calculate the 3D roll-off attenuation.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_set3docclusion" title="Sets the 3D attenuation factors for the direct and reverb paths.">ChannelControl::set3DOcclusion</a> Sets the 3D attenuation factors for the direct and reverb paths.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_get3docclusion" title="Retrieves the 3D attenuation factors for the direct and reverb paths.">ChannelControl::get3DOcclusion</a> Retrieves the 3D attenuation factors for the direct and reverb paths.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_set3dspread" title="Sets the spread of a 3D sound in speaker space.">ChannelControl::set3DSpread</a> Sets the spread of a 3D sound in speaker space.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_get3dspread" title="Retrieves the spread of a 3D sound in speaker space.">ChannelControl::get3DSpread</a> Retrieves the spread of a 3D sound in speaker space.</span></li>
</ul>
<p><strong>Panning and level adjustment:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setpan" title="Sets the left/right pan level.">ChannelControl::setPan</a> Sets the left/right pan level.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setmixlevelsinput" title="Sets the incoming volume level for each channel of a multi-channel signal.">ChannelControl::setMixLevelsInput</a> Sets the incoming volume level for each channel of a multi-channel <a href="glossary.html#signal">signal</a>.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setmixlevelsoutput" title="Sets the outgoing volume levels for each speaker.">ChannelControl::setMixLevelsOutput</a> Sets the outgoing volume levels for each speaker.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setmixmatrix" title="Sets a two-dimensional pan matrix that maps the signal from input channels (columns) to output speakers (rows).">ChannelControl::setMixMatrix</a> Sets a two-dimensional pan matrix that maps the <a href="glossary.html#signal">signal</a> from input channels (columns) to output speakers (rows).</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getmixmatrix" title="Retrieves a 2 dimensional pan matrix that maps the signal from input channels (columns) to output speakers (rows).">ChannelControl::getMixMatrix</a> Retrieves a 2 dimensional pan matrix that maps the <a href="glossary.html#signal">signal</a> from input channels (columns) to output speakers (rows).</span></li>
</ul>
<p><strong>Filtering:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setreverbproperties" title="Sets the wet / send level for a particular reverb instance.">ChannelControl::setReverbProperties</a> Sets the wet / send level for a particular reverb instance.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getreverbproperties" title="Retrieves the wet / send level for a particular reverb instance.">ChannelControl::getReverbProperties</a> Retrieves the wet / send level for a particular reverb instance.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setlowpassgain" title="Sets the gain of the dry signal when built in lowpass / distance filtering is applied.">ChannelControl::setLowPassGain</a> Sets the gain of the dry <a href="glossary.html#signal">signal</a> when built in lowpass / distance filtering is applied.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getlowpassgain" title="Retrieves the gain of the dry signal when built in lowpass / distance filtering is applied.">ChannelControl::getLowPassGain</a> Retrieves the gain of the dry <a href="glossary.html#signal">signal</a> when built in lowpass / distance filtering is applied.</span></li>
</ul>
<p><strong>DSP chain configuration:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_adddsp" title="Adds a DSP unit to the specified index in the DSP chain.">ChannelControl::addDSP</a> Adds a <a href="glossary.html#dsp">DSP unit</a> to the specified index in the <a href="glossary.html#dsp-chain">DSP chain</a>.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_removedsp" title="Removes the specified DSP unit from the DSP chain.">ChannelControl::removeDSP</a> Removes the specified <a href="glossary.html#dsp">DSP unit</a> from the <a href="glossary.html#dsp-chain">DSP chain</a>.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getnumdsps" title="Retrieves the number of DSP units in the DSP chain.">ChannelControl::getNumDSPs</a> Retrieves the number of <a href="glossary.html#dsp">DSP units</a> in the <a href="glossary.html#dsp-chain">DSP chain</a>.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getdsp" title="Retrieves the DSP unit at the specified index in the DSP chain.">ChannelControl::getDSP</a> Retrieves the <a href="glossary.html#dsp">DSP unit</a> at the specified index in the <a href="glossary.html#dsp-chain">DSP chain</a>.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setdspindex" title="Sets the index in the DSP chain of the specified DSP.">ChannelControl::setDSPIndex</a> Sets the index in the <a href="glossary.html#dsp-chain">DSP chain</a> of the specified <a href="glossary.html#dsp">DSP</a>.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getdspindex" title="Retrieves the index of a DSP inside the Channel or ChannelGroup's DSP chain.">ChannelControl::getDSPIndex</a> Retrieves the index of a <a href="glossary.html#dsp">DSP</a> inside the <a href="core-api-channel.html">Channel</a> or <a href="core-api-channelgroup.html">ChannelGroup</a>'s <a href="glossary.html#dsp-chain">DSP chain</a>.</span></li>
</ul>
<p><strong>Sample accurate scheduling:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getdspclock" title="Retrieves the DSP clock values at this point in time.">ChannelControl::getDSPClock</a> Retrieves the <a href="glossary.html#dsp-clock">DSP clock</a> values at this point in time.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setdelay" title="Sets a sample accurate start (and/or stop) time relative to the parent ChannelGroup DSP clock.">ChannelControl::setDelay</a> Sets a sample accurate start (and/or stop) time relative to the parent ChannelGroup <a href="glossary.html#dsp-clock">DSP clock</a>.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getdelay" title="Retrieves a sample accurate start (and/or stop) time relative to the parent ChannelGroup DSP clock.">ChannelControl::getDelay</a> Retrieves a sample accurate start (and/or stop) time relative to the parent ChannelGroup <a href="glossary.html#dsp-clock">DSP clock</a>.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_addfadepoint" title="Adds a sample accurate fade point at a time relative to the parent ChannelGroup DSP clock.">ChannelControl::addFadePoint</a> Adds a sample accurate fade point at a time relative to the parent ChannelGroup <a href="glossary.html#dsp-clock">DSP clock</a>.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setfadepointramp" title="Adds a volume ramp at the specified time in the future using fade points.">ChannelControl::setFadePointRamp</a> Adds a volume ramp at the specified time in the future using fade points.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_removefadepoints" title="Removes all fade points between the two specified clock values (inclusive).">ChannelControl::removeFadePoints</a> Removes all fade points between the two specified clock values (inclusive).</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getfadepoints" title="Retrieves information about stored fade points.">ChannelControl::getFadePoints</a> Retrieves information about stored fade points.</span></li>
</ul>
<p><strong>General:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setcallback" title="Sets the callback for ChannelControl level notifications.">ChannelControl::setCallback</a> Sets the callback for ChannelControl level notifications.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setuserdata" title="Sets a user value associated with this object.">ChannelControl::setUserData</a> Sets a user value associated with this object.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getuserdata" title="Retrieves a user value associated with this object.">ChannelControl::getUserData</a> Retrieves a user value associated with this object.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getsystemobject" title="Retrieves the System that created this object.">ChannelControl::getSystemObject</a> Retrieves the System that created this object.</span></li>
</ul>
<h2 api="function" id="channel_getchannelgroup"><a href="#channel_getchannelgroup">Channel::getChannelGroup</a></h2>
<p>Retrieves the ChannelGroup this object outputs to.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">Channel</span><span class="o">::</span><span class="n">getChannelGroup</span><span class="p">(</span>
<span class="n">ChannelGroup</span> <span class="o">**</span><span class="n">channelgroup</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Channel_GetChannelGroup</span><span class="p">(</span>
<span class="n">FMOD_CHANNEL</span> <span class="o">*</span><span class="n">channel</span><span class="p">,</span>
<span class="n">FMOD_CHANNELGROUP</span> <span class="o">**</span><span class="n">channelgroup</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">Channel</span><span class="p">.</span><span class="n">getChannelGroup</span><span class="p">(</span>
<span class="k">out</span> <span class="n">ChannelGroup</span> <span class="n">channelgroup</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">Channel</span><span class="p">.</span><span class="nx">getChannelGroup</span><span class="p">(</span>
<span class="nx">channelgroup</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>channelgroup <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>Output group. (<a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a>)</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-channel.html#channel_setchannelgroup">Channel::setChannelGroup</a></p>
<h2 api="function" id="channel_getcurrentsound"><a href="#channel_getcurrentsound">Channel::getCurrentSound</a></h2>
<p>Retrieves the currently playing Sound.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">Channel</span><span class="o">::</span><span class="n">getCurrentSound</span><span class="p">(</span>
<span class="n">Sound</span> <span class="o">**</span><span class="n">sound</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Channel_GetCurrentSound</span><span class="p">(</span>
<span class="n">FMOD_CHANNEL</span> <span class="o">*</span><span class="n">channel</span><span class="p">,</span>
<span class="n">FMOD_SOUND</span> <span class="o">**</span><span class="n">sound</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">Channel</span><span class="p">.</span><span class="n">getCurrentSound</span><span class="p">(</span>
<span class="k">out</span> <span class="n">Sound</span> <span class="n">sound</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">Channel</span><span class="p">.</span><span class="nx">getCurrentSound</span><span class="p">(</span>
<span class="nx">sound</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>sound <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>Currently playing sound. (<a class="apilink" href="core-api-sound.html">Sound</a>)</dd>
</dl>
<p>May return NULL or equivalent if no <a class="apilink" href="core-api-sound.html">Sound</a> is playing.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-system.html#system_playsound">System::playSound</a></p>
<h2 api="function" id="channel_getfrequency"><a href="#channel_getfrequency">Channel::getFrequency</a></h2>
<p>Retrieves the playback frequency or playback rate.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">Channel</span><span class="o">::</span><span class="n">getFrequency</span><span class="p">(</span>
<span class="kt">float</span> <span class="o">*</span><span class="n">frequency</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Channel_GetFrequency</span><span class="p">(</span>
<span class="n">FMOD_CHANNEL</span> <span class="o">*</span><span class="n">channel</span><span class="p">,</span>
<span class="kt">float</span> <span class="o">*</span><span class="n">frequency</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">Channel</span><span class="p">.</span><span class="n">getFrequency</span><span class="p">(</span>
<span class="k">out</span> <span class="kt">float</span> <span class="n">frequency</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">Channel</span><span class="p">.</span><span class="nx">getFrequency</span><span class="p">(</span>
<span class="nx">frequency</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>frequency <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>
<p>Playback frequency.</p>
<ul>
<li><span class="label">Units:</span> Hertz</li>
</ul>
</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-channel.html#channel_setfrequency">Channel::setFrequency</a></p>
<h2 api="function" id="channel_getindex"><a href="#channel_getindex">Channel::getIndex</a></h2>
<p>Retrieves the index of this object in the System Channel pool.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">Channel</span><span class="o">::</span><span class="n">getIndex</span><span class="p">(</span>
<span class="kt">int</span> <span class="o">*</span><span class="n">index</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Channel_GetIndex</span><span class="p">(</span>
<span class="n">FMOD_CHANNEL</span> <span class="o">*</span><span class="n">channel</span><span class="p">,</span>
<span class="kt">int</span> <span class="o">*</span><span class="n">index</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">Channel</span><span class="p">.</span><span class="n">getIndex</span><span class="p">(</span>
<span class="k">out</span> <span class="kt">int</span> <span class="n">index</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">Channel</span><span class="p">.</span><span class="nx">getIndex</span><span class="p">(</span>
<span class="nx">index</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>index <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>
<p>Index within the <a class="apilink" href="core-api-system.html">System</a> <a class="apilink" href="core-api-channel.html">Channel</a> pool.</p>
<ul>
<li><span class="label">Range:</span> [0, 'maxchannels' value from <a class="apilink" href="core-api-system.html#system_init">System::init</a> - 1]</li>
</ul>
</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-system.html#system_getchannel">System::getChannel</a></p>
<h2 api="function" id="channel_getloopcount"><a href="#channel_getloopcount">Channel::getLoopCount</a></h2>
<p>Retrieves the number of times to loop before stopping.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">Channel</span><span class="o">::</span><span class="n">getLoopCount</span><span class="p">(</span>
<span class="kt">int</span> <span class="o">*</span><span class="n">loopcount</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Channel_GetLoopCount</span><span class="p">(</span>
<span class="n">FMOD_CHANNEL</span> <span class="o">*</span><span class="n">channel</span><span class="p">,</span>
<span class="kt">int</span> <span class="o">*</span><span class="n">loopcount</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">Channel</span><span class="p">.</span><span class="n">getLoopCount</span><span class="p">(</span>
<span class="k">out</span> <span class="kt">int</span> <span class="n">loopcount</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">Channel</span><span class="p">.</span><span class="nx">getLoopCount</span><span class="p">(</span>
<span class="nx">loopcount</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>loopcount <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>Times to loop before stopping where 0 represents "oneshot", 1 represents "loop once then stop" and -1 represents "loop forever".</dd>
</dl>
<p>This is the <em>current</em> loop countdown value that will decrement as it plays until reaching 0. Reset with <a class="apilink" href="core-api-channel.html#channel_setloopcount">Channel::setLoopCount</a>.</p>
<h2 api="function" id="channel_getlooppoints"><a href="#channel_getlooppoints">Channel::getLoopPoints</a></h2>
<p>Retrieves the loop start and end points.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">Channel</span><span class="o">::</span><span class="n">getLoopPoints</span><span class="p">(</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="o">*</span><span class="n">loopstart</span><span class="p">,</span>
<span class="n">FMOD_TIMEUNIT</span> <span class="n">loopstarttype</span><span class="p">,</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="o">*</span><span class="n">loopend</span><span class="p">,</span>
<span class="n">FMOD_TIMEUNIT</span> <span class="n">loopendtype</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Channel_GetLoopPoints</span><span class="p">(</span>
<span class="n">FMOD_CHANNEL</span> <span class="o">*</span><span class="n">channel</span><span class="p">,</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="o">*</span><span class="n">loopstart</span><span class="p">,</span>
<span class="n">FMOD_TIMEUNIT</span> <span class="n">loopstarttype</span><span class="p">,</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="o">*</span><span class="n">loopend</span><span class="p">,</span>
<span class="n">FMOD_TIMEUNIT</span> <span class="n">loopendtype</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">Channel</span><span class="p">.</span><span class="n">getLoopPoints</span><span class="p">(</span>
<span class="k">out</span> <span class="kt">uint</span> <span class="n">loopstart</span><span class="p">,</span>
<span class="n">TIMEUNIT</span> <span class="n">loopstarttype</span><span class="p">,</span>
<span class="k">out</span> <span class="kt">uint</span> <span class="n">loopend</span><span class="p">,</span>
<span class="n">TIMEUNIT</span> <span class="n">loopendtype</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">Channel</span><span class="p">.</span><span class="nx">getLoopPoints</span><span class="p">(</span>
<span class="nx">loopstart</span><span class="p">,</span>
<span class="nx">loopstarttype</span><span class="p">,</span>
<span class="nx">loopend</span><span class="p">,</span>
<span class="nx">loopendtype</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>loopstart <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a><a class="token" href="glossary.html#documentation-conventions" title="Optional">Opt</a></span></dt>
<dd>
<p>Loop start point.</p>
<ul>
<li><span class="label">Range:</span> [0, <a class="apilink" href="core-api-sound.html#sound_getlength">Sound::getLength</a> - 1]. </li>
</ul>
</dd>
<dt>loopstarttype</dt>
<dd>Time units for <code>loopstart</code>. (<a class="apilink" href="core-api-common.html#fmod_timeunit">FMOD_TIMEUNIT</a>)</dd>
<dt>loopend <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a><a class="token" href="glossary.html#documentation-conventions" title="Optional">Opt</a></span></dt>
<dd>
<p>Loop end point.</p>
<ul>
<li><span class="label">Range:</span> [0, <a class="apilink" href="core-api-sound.html#sound_getlength">Sound::getLength</a> - 1]. </li>
</ul>
</dd>
<dt>loopendtype</dt>
<dd>Time units for <code>loopend</code>. (<a class="apilink" href="core-api-common.html#fmod_timeunit">FMOD_TIMEUNIT</a>)</dd>
</dl>
<p>Valid <a class="apilink" href="core-api-common.html#fmod_timeunit">FMOD_TIMEUNIT</a> types are <a class="apilink" href="core-api-common.html#fmod_timeunit_pcm">FMOD_TIMEUNIT_PCM</a>, <a class="apilink" href="core-api-common.html#fmod_timeunit_ms">FMOD_TIMEUNIT_MS</a>, <a class="apilink" href="core-api-common.html#fmod_timeunit_pcmbytes">FMOD_TIMEUNIT_PCMBYTES</a>. Any other time units return <a class="apilink" href="core-api-common.html#fmod_err_format">FMOD_ERR_FORMAT</a>.<br />
If <a class="apilink" href="core-api-common.html#fmod_timeunit_ms">FMOD_TIMEUNIT_MS</a> or <a class="apilink" href="core-api-common.html#fmod_timeunit_pcmbytes">FMOD_TIMEUNIT_PCMBYTES</a> are used, the value is internally converted from <a class="apilink" href="core-api-common.html#fmod_timeunit_pcm">FMOD_TIMEUNIT_PCM</a>, so the retrieved value may not exactly match the set value.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-channel.html#channel_setlooppoints">Channel::setLoopPoints</a></p>
<h2 api="function" id="channel_getposition"><a href="#channel_getposition">Channel::getPosition</a></h2>
<p>Retrieves the current playback position.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">Channel</span><span class="o">::</span><span class="n">getPosition</span><span class="p">(</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="o">*</span><span class="n">position</span><span class="p">,</span>
<span class="n">FMOD_TIMEUNIT</span> <span class="n">postype</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Channel_GetPosition</span><span class="p">(</span>
<span class="n">FMOD_CHANNEL</span> <span class="o">*</span><span class="n">channel</span><span class="p">,</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="o">*</span><span class="n">position</span><span class="p">,</span>
<span class="n">FMOD_TIMEUNIT</span> <span class="n">postype</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">Channel</span><span class="p">.</span><span class="n">getPosition</span><span class="p">(</span>
<span class="k">out</span> <span class="kt">uint</span> <span class="n">position</span><span class="p">,</span>
<span class="n">TIMEUNIT</span> <span class="n">postype</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">Channel</span><span class="p">.</span><span class="nx">getPosition</span><span class="p">(</span>
<span class="nx">position</span><span class="p">,</span>
<span class="nx">postype</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>position <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>Playback position.</dd>
<dt>postype</dt>
<dd>Time units for <code>position</code>. (<a class="apilink" href="core-api-common.html#fmod_timeunit">FMOD_TIMEUNIT</a>)</dd>
</dl>
<p>Certain <a class="apilink" href="core-api-common.html#fmod_timeunit">FMOD_TIMEUNIT</a> types are always available: <a class="apilink" href="core-api-common.html#fmod_timeunit_pcm">FMOD_TIMEUNIT_PCM</a>, <a class="apilink" href="core-api-common.html#fmod_timeunit_pcmbytes">FMOD_TIMEUNIT_PCMBYTES</a> and <a class="apilink" href="core-api-common.html#fmod_timeunit_ms">FMOD_TIMEUNIT_MS</a>. The others are format specific such as <a class="apilink" href="core-api-common.html#fmod_timeunit_modorder">FMOD_TIMEUNIT_MODORDER</a> / <a class="apilink" href="core-api-common.html#fmod_timeunit_modrow">FMOD_TIMEUNIT_MODROW</a> / <a class="apilink" href="core-api-common.html#fmod_timeunit_modpattern">FMOD_TIMEUNIT_MODPATTERN</a> which is specific to files of type MOD / S3M / XM / IT.</p>
<p>If <a class="apilink" href="core-api-common.html#fmod_timeunit_ms">FMOD_TIMEUNIT_MS</a> or <a class="apilink" href="core-api-common.html#fmod_timeunit_pcmbytes">FMOD_TIMEUNIT_PCMBYTES</a> are used, the value is internally converted from <a class="apilink" href="core-api-common.html#fmod_timeunit_pcm">FMOD_TIMEUNIT_PCM</a>, so the retrieved value may not exactly match the set value.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-channel.html#channel_setposition">Channel::setPosition</a></p>
<h2 api="function" id="channel_getpriority"><a href="#channel_getpriority">Channel::getPriority</a></h2>
<p>Retrieves the priority used for virtual voice ordering.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">Channel</span><span class="o">::</span><span class="n">getPriority</span><span class="p">(</span>
<span class="kt">int</span> <span class="o">*</span><span class="n">priority</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Channel_GetPriority</span><span class="p">(</span>
<span class="n">FMOD_CHANNEL</span> <span class="o">*</span><span class="n">channel</span><span class="p">,</span>
<span class="kt">int</span> <span class="o">*</span><span class="n">priority</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">Channel</span><span class="p">.</span><span class="n">getPriority</span><span class="p">(</span>
<span class="k">out</span> <span class="kt">int</span> <span class="n">priority</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">Channel</span><span class="p">.</span><span class="nx">getPriority</span><span class="p">(</span>
<span class="nx">priority</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>priority <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>
<p>Priority where 0 represents most important and 256 represents least important.</p>
<ul>
<li><span class="label">Range:</span> [0, 256]</li>
<li><span class="label">Default:</span> 128</li>
</ul>
</dd>
</dl>
<p>Priority is used as a coarse grain control for the virtual voice system, lower priority <a class="apilink" href="core-api-channel.html">Channel</a>s will always be stolen before higher ones. For <a class="apilink" href="core-api-channel.html">Channel</a>s of equal priority, those with the quietest <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getaudibility">ChannelControl::getAudibility</a> value will be stolen first.</p>
<p>For more information, see the <a href="managing-resources-in-the-core-api.html#virtual-voice-system">Virtual Voice System</a> section of the <a href="managing-resources-in-the-core-api.html">Managing Resources in the Core API</a> chapter.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-channel.html#channel_setpriority">Channel::setPriority</a></p>
<h2 api="function" id="channel_isvirtual"><a href="#channel_isvirtual">Channel::isVirtual</a></h2>
<p>Retrieves whether the Channel is being emulated by the virtual voice system.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">Channel</span><span class="o">::</span><span class="n">isVirtual</span><span class="p">(</span>
<span class="kt">bool</span> <span class="o">*</span><span class="n">isvirtual</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Channel_IsVirtual</span><span class="p">(</span>
<span class="n">FMOD_CHANNEL</span> <span class="o">*</span><span class="n">channel</span><span class="p">,</span>
<span class="n">FMOD_BOOL</span> <span class="o">*</span><span class="n">isvirtual</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">Channel</span><span class="p">.</span><span class="n">isVirtual</span><span class="p">(</span>
<span class="k">out</span> <span class="kt">bool</span> <span class="n">isvirtual</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">Channel</span><span class="p">.</span><span class="nx">isVirtual</span><span class="p">(</span>
<span class="nx">isvirtual</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>isvirtual <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>
<p>Virtual state. True = silent / emulated. False = audible / real.</p>
<ul>
<li><span class="label">Units:</span> Boolean</li>
</ul>
</dd>
</dl>
<p>See the <a href="managing-resources-in-the-core-api.html#virtual-voice-system">Virtual Voice System</a> section of the <a href="managing-resources-in-the-core-api.html">Managing Resources in the Core API</a> chapter for more information.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getaudibility">ChannelControl::getAudibility</a></p>
<h2 api="function" id="channel_setchannelgroup"><a href="#channel_setchannelgroup">Channel::setChannelGroup</a></h2>
<p>Sets the ChannelGroup this object outputs to.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">Channel</span><span class="o">::</span><span class="n">setChannelGroup</span><span class="p">(</span>
<span class="n">ChannelGroup</span> <span class="o">*</span><span class="n">channelgroup</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Channel_SetChannelGroup</span><span class="p">(</span>
<span class="n">FMOD_CHANNEL</span> <span class="o">*</span><span class="n">channel</span><span class="p">,</span>
<span class="n">FMOD_CHANNELGROUP</span> <span class="o">*</span><span class="n">channelgroup</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">Channel</span><span class="p">.</span><span class="n">setChannelGroup</span><span class="p">(</span>
<span class="n">ChannelGroup</span> <span class="n">channelgroup</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">Channel</span><span class="p">.</span><span class="nx">setChannelGroup</span><span class="p">(</span>
<span class="nx">channelgroup</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>channelgroup</dt>
<dd>Output group. (<a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a>)</dd>
</dl>
<p>A <a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a> may contain many <a class="apilink" href="core-api-channel.html">Channel</a>s.</p>
<p><a class="apilink" href="core-api-channel.html">Channel</a>s may only output to a single <a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a>. This operation will remove it from the previous group first.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-channel.html#channel_getchannelgroup">Channel::getChannelGroup</a></p>
<h2 api="function" id="channel_setfrequency"><a href="#channel_setfrequency">Channel::setFrequency</a></h2>
<p>Sets the frequency or playback rate.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">Channel</span><span class="o">::</span><span class="n">setFrequency</span><span class="p">(</span>
<span class="kt">float</span> <span class="n">frequency</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Channel_SetFrequency</span><span class="p">(</span>
<span class="n">FMOD_CHANNEL</span> <span class="o">*</span><span class="n">channel</span><span class="p">,</span>
<span class="kt">float</span> <span class="n">frequency</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">Channel</span><span class="p">.</span><span class="n">setFrequency</span><span class="p">(</span>
<span class="kt">float</span> <span class="n">frequency</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">Channel</span><span class="p">.</span><span class="nx">setFrequency</span><span class="p">(</span>
<span class="nx">frequency</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>frequency</dt>
<dd>
<p>Playback rate.</p>
<ul>
<li><span class="label">Units:</span> Hertz</li>
</ul>
</dd>
</dl>
<p>Default frequency is determined by the audio format of the <a class="apilink" href="core-api-sound.html">Sound</a> or <a class="apilink" href="core-api-dsp.html">DSP</a>.</p>
<p>Sounds opened as <a class="apilink" href="core-api-common.html#fmod_createsample">FMOD_CREATESAMPLE</a> (not <a class="apilink" href="core-api-common.html#fmod_createstream">FMOD_CREATESTREAM</a> or <a class="apilink" href="core-api-common.html#fmod_createcompressedsample">FMOD_CREATECOMPRESSEDSAMPLE</a>) can be played backwards by giving a negative frequency.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-channel.html#channel_getfrequency">Channel::getFrequency</a>, <a class="apilink" href="core-api-sound.html#sound_setdefaults">Sound::setDefaults</a></p>
<h2 api="function" id="channel_setloopcount"><a href="#channel_setloopcount">Channel::setLoopCount</a></h2>
<p>Sets the number of times to loop before stopping.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">Channel</span><span class="o">::</span><span class="n">setLoopCount</span><span class="p">(</span>
<span class="kt">int</span> <span class="n">loopcount</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Channel_SetLoopCount</span><span class="p">(</span>
<span class="n">FMOD_CHANNEL</span> <span class="o">*</span><span class="n">channel</span><span class="p">,</span>
<span class="kt">int</span> <span class="n">loopcount</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">Channel</span><span class="p">.</span><span class="n">setLoopCount</span><span class="p">(</span>
<span class="kt">int</span> <span class="n">loopcount</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">Channel</span><span class="p">.</span><span class="nx">setLoopCount</span><span class="p">(</span>
<span class="nx">loopcount</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>loopcount</dt>
<dd>Times to loop before stopping where 0 represents "oneshot", 1 represents "loop once then stop" and -1 represents "loop forever".</dd>
</dl>
<p>The 'mode' of the <a class="apilink" href="core-api-sound.html">Sound</a> or <a class="apilink" href="core-api-channel.html">Channel</a> must be <a class="apilink" href="core-api-common.html#fmod_loop_normal">FMOD_LOOP_NORMAL</a> or <a class="apilink" href="core-api-common.html#fmod_loop_bidi">FMOD_LOOP_BIDI</a> for this function to work.</p>
<p><strong>See Also:</strong> <a href="glossary.html#streaming-issues">Streaming Issues</a>, <a class="apilink" href="core-api-channel.html#channel_getloopcount">Channel::getLoopCount</a>, <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setmode">ChannelControl::setMode</a>, <a class="apilink" href="core-api-sound.html#sound_setmode">Sound::setMode</a>, <a class="apilink" href="core-api-system.html#system_createsound">System::createSound</a></p>
<h2 api="function" id="channel_setlooppoints"><a href="#channel_setlooppoints">Channel::setLoopPoints</a></h2>
<p>Sets the loop start and end points.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">Channel</span><span class="o">::</span><span class="n">setLoopPoints</span><span class="p">(</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">loopstart</span><span class="p">,</span>
<span class="n">FMOD_TIMEUNIT</span> <span class="n">loopstarttype</span><span class="p">,</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">loopend</span><span class="p">,</span>
<span class="n">FMOD_TIMEUNIT</span> <span class="n">loopendtype</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Channel_SetLoopPoints</span><span class="p">(</span>
<span class="n">FMOD_CHANNEL</span> <span class="o">*</span><span class="n">channel</span><span class="p">,</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">loopstart</span><span class="p">,</span>
<span class="n">FMOD_TIMEUNIT</span> <span class="n">loopstarttype</span><span class="p">,</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">loopend</span><span class="p">,</span>
<span class="n">FMOD_TIMEUNIT</span> <span class="n">loopendtype</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">Channel</span><span class="p">.</span><span class="n">setLoopPoints</span><span class="p">(</span>
<span class="kt">uint</span> <span class="n">loopstart</span><span class="p">,</span>
<span class="n">TIMEUNIT</span> <span class="n">loopstarttype</span><span class="p">,</span>
<span class="kt">uint</span> <span class="n">loopend</span><span class="p">,</span>
<span class="n">TIMEUNIT</span> <span class="n">loopendtype</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">Channel</span><span class="p">.</span><span class="nx">setLoopPoints</span><span class="p">(</span>
<span class="nx">loopstart</span><span class="p">,</span>
<span class="nx">loopstarttype</span><span class="p">,</span>
<span class="nx">loopend</span><span class="p">,</span>
<span class="nx">loopendtype</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>loopstart</dt>
<dd>
<p>Loop start point.</p>
<ul>
<li><span class="label">Range:</span> [0, <a class="apilink" href="core-api-sound.html#sound_getlength">Sound::getLength</a> - 1].</li>
</ul>
</dd>
<dt>loopstarttype</dt>
<dd>Time units for <code>loopstart</code>. (<a class="apilink" href="core-api-common.html#fmod_timeunit">FMOD_TIMEUNIT</a>)</dd>
<dt>loopend</dt>
<dd>
<p>Loop end point.</p>
<ul>
<li>Range; [<code>loopstart</code> + 1, <a class="apilink" href="core-api-sound.html#sound_getlength">Sound::getLength</a> - 1].</li>
</ul>
</dd>
<dt>loopendtype</dt>
<dd>Time units for <code>loopend</code>. (<a class="apilink" href="core-api-common.html#fmod_timeunit">FMOD_TIMEUNIT</a>)</dd>
</dl>
<p>Loop points may only be set on a <a class="apilink" href="core-api-channel.html">Channel</a> playing a <a class="apilink" href="core-api-sound.html">Sound</a>, not a <a class="apilink" href="core-api-channel.html">Channel</a> playing a <a class="apilink" href="core-api-dsp.html">DSP</a> (See <a class="apilink" href="core-api-system.html#system_playdsp">System::playDSP</a>).</p>
<p>Valid <a class="apilink" href="core-api-common.html#fmod_timeunit">FMOD_TIMEUNIT</a> types are <a class="apilink" href="core-api-common.html#fmod_timeunit_pcm">FMOD_TIMEUNIT_PCM</a>, <a class="apilink" href="core-api-common.html#fmod_timeunit_ms">FMOD_TIMEUNIT_MS</a>, <a class="apilink" href="core-api-common.html#fmod_timeunit_pcmbytes">FMOD_TIMEUNIT_PCMBYTES</a>. Any other time units return <a class="apilink" href="core-api-common.html#fmod_err_format">FMOD_ERR_FORMAT</a>.<br />
If <a class="apilink" href="core-api-common.html#fmod_timeunit_ms">FMOD_TIMEUNIT_MS</a> or <a class="apilink" href="core-api-common.html#fmod_timeunit_pcmbytes">FMOD_TIMEUNIT_PCMBYTES</a>, the value is internally converted to <a class="apilink" href="core-api-common.html#fmod_timeunit_pcm">FMOD_TIMEUNIT_PCM</a>.</p>
<p>The <a class="apilink" href="core-api-channel.html">Channel</a>'s mode must be set to <a class="apilink" href="core-api-common.html#fmod_loop_normal">FMOD_LOOP_NORMAL</a> or <a class="apilink" href="core-api-common.html#fmod_loop_bidi">FMOD_LOOP_BIDI</a> for loop points to affect playback.</p>
<p><strong>See Also:</strong> <a href="glossary.html#streaming-issues">Streaming Issues</a>, <a class="apilink" href="core-api-channel.html#channel_getlooppoints">Channel::getLoopPoints</a>, <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setmode">ChannelControl::setMode</a></p>
<h2 api="function" id="channel_setposition"><a href="#channel_setposition">Channel::setPosition</a></h2>
<p>Sets the current playback position.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">Channel</span><span class="o">::</span><span class="n">setPosition</span><span class="p">(</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">position</span><span class="p">,</span>
<span class="n">FMOD_TIMEUNIT</span> <span class="n">postype</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Channel_SetPosition</span><span class="p">(</span>
<span class="n">FMOD_CHANNEL</span> <span class="o">*</span><span class="n">channel</span><span class="p">,</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">position</span><span class="p">,</span>
<span class="n">FMOD_TIMEUNIT</span> <span class="n">postype</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">Channel</span><span class="p">.</span><span class="n">setPosition</span><span class="p">(</span>
<span class="kt">uint</span> <span class="n">position</span><span class="p">,</span>
<span class="n">TIMEUNIT</span> <span class="n">postype</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">Channel</span><span class="p">.</span><span class="nx">setPosition</span><span class="p">(</span>
<span class="nx">position</span><span class="p">,</span>
<span class="nx">postype</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>position</dt>
<dd>Playback position.</dd>
<dt>postype</dt>
<dd>Time units for <code>position</code>. (<a class="apilink" href="core-api-common.html#fmod_timeunit">FMOD_TIMEUNIT</a>)</dd>
</dl>
<p>Certain <a class="apilink" href="core-api-common.html#fmod_timeunit">FMOD_TIMEUNIT</a> types are always available: <a class="apilink" href="core-api-common.html#fmod_timeunit_pcm">FMOD_TIMEUNIT_PCM</a>, <a class="apilink" href="core-api-common.html#fmod_timeunit_pcmbytes">FMOD_TIMEUNIT_PCMBYTES</a> and <a class="apilink" href="core-api-common.html#fmod_timeunit_ms">FMOD_TIMEUNIT_MS</a>. The others are format specific such as <a class="apilink" href="core-api-common.html#fmod_timeunit_modorder">FMOD_TIMEUNIT_MODORDER</a> / <a class="apilink" href="core-api-common.html#fmod_timeunit_modrow">FMOD_TIMEUNIT_MODROW</a> / <a class="apilink" href="core-api-common.html#fmod_timeunit_modpattern">FMOD_TIMEUNIT_MODPATTERN</a> which is specific to files of type MOD / S3M / XM / IT.</p>
<p>If playing a <a class="apilink" href="core-api-sound.html">Sound</a> created with <a class="apilink" href="core-api-system.html#system_createstream">System::createStream</a> or <a class="apilink" href="core-api-common.html#fmod_createstream">FMOD_CREATESTREAM</a> changing the position may cause a slow reflush operation while the file seek and decode occurs. You can avoid this by creating the stream with <a class="apilink" href="core-api-common.html#fmod_nonblocking">FMOD_NONBLOCKING</a>. This will cause the stream to go into <a class="apilink" href="core-api-sound.html#fmod_openstate_setposition">FMOD_OPENSTATE_SETPOSITION</a> state (see <a class="apilink" href="core-api-sound.html#sound_getopenstate">Sound::getOpenState</a>) and Sound commands will return <a class="apilink" href="core-api-common.html#fmod_err_notready">FMOD_ERR_NOTREADY</a>. <a class="apilink" href="core-api-channel.html#channel_getposition">Channel::getPosition</a> will also not update until this non-blocking set position operation has completed.</p>
<p>Using a VBR source that does not have an associated seek table or seek information (such as MP3 or MOD/S3M/XM/IT) may cause inaccurate seeking if you specify <a class="apilink" href="core-api-common.html#fmod_timeunit_ms">FMOD_TIMEUNIT_MS</a> or <a class="apilink" href="core-api-common.html#fmod_timeunit_pcm">FMOD_TIMEUNIT_PCM</a>. If you want FMOD to create a PCM vs bytes seek table so that seeking is accurate, you will have to specify <a class="apilink" href="core-api-common.html#fmod_accuratetime">FMOD_ACCURATETIME</a> when loading or opening the sound. This means there is a slight delay as FMOD scans the whole file when loading the sound to create this table.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-channel.html#channel_getposition">Channel::getPosition</a></p>
<h2 api="function" id="channel_setpriority"><a href="#channel_setpriority">Channel::setPriority</a></h2>
<p>Sets the priority used for virtual voice ordering.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">Channel</span><span class="o">::</span><span class="n">setPriority</span><span class="p">(</span>
<span class="kt">int</span> <span class="n">priority</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Channel_SetPriority</span><span class="p">(</span>
<span class="n">FMOD_CHANNEL</span> <span class="o">*</span><span class="n">channel</span><span class="p">,</span>
<span class="kt">int</span> <span class="n">priority</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">Channel</span><span class="p">.</span><span class="n">setPriority</span><span class="p">(</span>
<span class="kt">int</span> <span class="n">priority</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">Channel</span><span class="p">.</span><span class="nx">setPriority</span><span class="p">(</span>
<span class="nx">priority</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>priority</dt>
<dd>
<p>Priority where 0 represents most important and 256 represents least important.</p>
<ul>
<li><span class="label">Range:</span> [0, 256]</li>
<li><span class="label">Default:</span> 128</li>
</ul>
</dd>
</dl>
<p>Priority is used as a coarse grain control for the virtual voice system, lower priority <a class="apilink" href="core-api-channel.html">Channel</a>s will always be stolen before higher ones. For <a class="apilink" href="core-api-channel.html">Channel</a>s of equal priority, those with the quietest <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getaudibility">ChannelControl::getAudibility</a> value will be stolen first.</p>
<p>See the <a href="managing-resources-in-the-core-api.html#virtual-voice-system">Virtual Voice System</a> section of the <a href="managing-resources-in-the-core-api.html">Managing Resources in the Core API</a> chapter for more information.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-channel.html#channel_getpriority">Channel::getPriority</a></p></div>
<p class="manual-footer">FMOD Engine User Manual 2.03.13 (2026-03-31). &copy; 2026 Firelight Technologies Pty Ltd.</p>
</div>
</body>
</html>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,476 @@
<html>
<head>
<title>Core API Reference | ChannelGroup</title>
<link rel="stylesheet" href="style/docs.css">
<link rel="stylesheet" href="style/code_highlight.css">
<script type="text/javascript" src="scripts/language-selector.js"></script></head>
<body>
<div class="docs-body">
<div class="manual-toc">
<p>FMOD Engine User Manual 2.03</p>
<ul>
<li><a href="welcome.html">Welcome to the FMOD Engine</a></li>
<li><a href="core-api-concepts.html">Core API Key Concepts</a></li>
<li><a href="running-the-core-api.html">Core API Getting Started</a></li>
<li><a href="loading-and-playing-sounds-in-the-core-api.html">Core API Loading and Playing Sounds</a></li>
<li><a href="spatializing-sounds-in-the-core-api.html">Core API Spatializing Sounds</a></li>
<li><a href="mixing-and-routing-in-the-core-api.html">Core API Mixing and Routing</a></li>
<li><a href="using-dsp-effects-in-the-core-api.html">Core API Using DSP Effects</a></li>
<li><a href="effects-reference.html">Core API Effect Reference</a></li>
<li><a href="managing-resources-in-the-core-api.html">Core API Managing Resources</a></li>
<li><a href="advanced-core-api-topics.html">Core API Advanced Topics</a></li>
<li class="manual-current-chapter manual-inactive-chapter"><a href="core-api.html">Core API Reference</a><ul class="subchapters"><li><a href="core-api-common.html">Common</a></li><li><a href="core-api-common-dsp-effects.html">Effect Parameters</a></li><li><a href="core-api-system.html">System</a></li><li><a href="core-api-sound.html">Sound</a></li><li><a href="core-api-channelcontrol.html">ChannelControl</a></li><li><a href="core-api-channel.html">Channel</a></li><li class="manual-current-chapter manual-active-chapter"><a href="core-api-channelgroup.html">ChannelGroup</a></li><li><a href="core-api-soundgroup.html">SoundGroup</a></li><li><a href="core-api-dsp.html">DSP</a></li><li><a href="core-api-dspconnection.html">DSPConnection</a></li><li><a href="core-api-geometry.html">Geometry</a></li><li><a href="core-api-reverb3d.html">Reverb3D</a></li><li><a href="core-api-platform-ios.html">iOS Specific</a></li><li><a href="core-api-platform-android.html">Android Specific</a></li><li><a href="core-api-platform-html5.html">HTML5 Specific</a></li></ul></li>
<li><a href="studio-api-getting-started.html">Studio API Getting Started</a></li>
<li><a href="studio-guide.html">Studio API Guide</a></li>
<li><a href="studio-api-3d-events.html">Studio API 3D Events</a></li>
<li><a href="studio-api-threads.html">Studio API Threads</a></li>
<li><a href="studio-api.html">Studio API Reference</a></li>
<li><a href="platforms.html">Platform Details</a></li>
<li><a href="dsp-plugin-api-guide.html">Plug-in DSP API Guide</a></li>
<li><a href="plugin-api.html">Plug-in API Reference</a></li>
<li><a href="fsbank-api.html">FSBank API Reference</a></li>
<li><a href="troubleshooting.html">Troubleshooting</a></li>
<li><a href="glossary.html">Glossary</a></li>
</ul>
</div>
<div class="manual-content api">
<h1>11. Core API Reference | ChannelGroup</h1>
<p>A submix in the mixing hierarchy akin to a bus that can contain both <a class="apilink" href="core-api-channel.html">Channel</a> and <a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a> objects.</p>
<p>Create with <a class="apilink" href="core-api-system.html#system_createchannelgroup">System::createChannelGroup</a>.</p>
<p><strong>Channel management:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-channelgroup.html#channelgroup_getnumchannels" title="Retrieves the number of Channels that feed into to this group.">ChannelGroup::getNumChannels</a> Retrieves the number of Channels that feed into to this group.</span></li>
<li><span><a class="apilink" href="core-api-channelgroup.html#channelgroup_getchannel" title="Retrieves the Channel at the specified index in the list of Channel inputs.">ChannelGroup::getChannel</a> Retrieves the Channel at the specified index in the list of Channel inputs.</span></li>
</ul>
<p><strong>ChannelGroup management:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-channelgroup.html#channelgroup_addgroup" title="Adds a ChannelGroup as an input to this group.">ChannelGroup::addGroup</a> Adds a ChannelGroup as an input to this group.</span></li>
<li><span><a class="apilink" href="core-api-channelgroup.html#channelgroup_getnumgroups" title="Retrieves the number of ChannelGroups that feed into to this group.">ChannelGroup::getNumGroups</a> Retrieves the number of ChannelGroups that feed into to this group.</span></li>
<li><span><a class="apilink" href="core-api-channelgroup.html#channelgroup_getgroup" title="Retrieves the ChannelGroup at the specified index in the list of group inputs.">ChannelGroup::getGroup</a> Retrieves the ChannelGroup at the specified index in the list of group inputs.</span></li>
<li><span><a class="apilink" href="core-api-channelgroup.html#channelgroup_getparentgroup" title="Retrieves the ChannelGroup this object outputs to.">ChannelGroup::getParentGroup</a> Retrieves the ChannelGroup this object outputs to.</span></li>
</ul>
<p><strong>General:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-channelgroup.html#channelgroup_getname" title="Retrieves the name set when the group was created.">ChannelGroup::getName</a> Retrieves the name set when the group was created.</span></li>
<li><span><a class="apilink" href="core-api-channelgroup.html#channelgroup_release" title="Frees the memory for the group.">ChannelGroup::release</a> Frees the memory for the group.</span></li>
</ul>
<p>The following APIs are inherited from <a class="apilink" href="core-api-channelcontrol.html">ChannelControl</a>:</p>
<p><strong>Playback:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_isplaying" title="Retrieves the playing state.">ChannelControl::isPlaying</a> Retrieves the playing state.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_stop" title="Stops the Channel (or all Channels in nested ChannelGroups) from playing.">ChannelControl::stop</a> Stops the Channel (or all Channels in nested ChannelGroups) from playing.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setpaused" title="Sets the paused state.">ChannelControl::setPaused</a> Sets the paused state.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getpaused" title="Retrieves the paused state.">ChannelControl::getPaused</a> Retrieves the paused state.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setmode" title="Sets the playback mode that controls how this object behaves.">ChannelControl::setMode</a> Sets the playback mode that controls how this object behaves.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getmode" title="Retrieves the playback mode bits that control how this object behaves.">ChannelControl::getMode</a> Retrieves the playback mode bits that control how this object behaves.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setpitch" title="Sets the relative pitch / playback rate.">ChannelControl::setPitch</a> Sets the relative pitch / playback rate.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getpitch" title="Retrieves the relative pitch / playback rate.">ChannelControl::getPitch</a> Retrieves the relative pitch / playback rate.</span></li>
</ul>
<p><strong>Volume levels:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getaudibility" title="Gets the calculated audibility based on all attenuation factors which contribute to the final output volume.">ChannelControl::getAudibility</a> Gets the calculated audibility based on all attenuation factors which contribute to the final output volume.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setvolume" title="Sets the volume level.">ChannelControl::setVolume</a> Sets the volume level.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getvolume" title="Retrieves the volume level.">ChannelControl::getVolume</a> Retrieves the volume level.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setvolumeramp" title="Sets whether volume changes are ramped or instantaneous.">ChannelControl::setVolumeRamp</a> Sets whether volume changes are ramped or instantaneous.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getvolumeramp" title="Retrieves whether volume changes are ramped or instantaneous.">ChannelControl::getVolumeRamp</a> Retrieves whether volume changes are ramped or instantaneous.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setmute" title="Sets the mute state.">ChannelControl::setMute</a> Sets the mute state.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getmute" title="Retrieves the mute state.">ChannelControl::getMute</a> Retrieves the mute state.</span></li>
</ul>
<p><strong>Spatialization:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_set3dattributes" title="Sets the 3D position and velocity used to apply panning, attenuation and doppler.">ChannelControl::set3DAttributes</a> Sets the 3D position and velocity used to apply panning, attenuation and doppler.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_get3dattributes" title="Retrieves the 3D position and velocity used to apply panning, attenuation and doppler.">ChannelControl::get3DAttributes</a> Retrieves the 3D position and velocity used to apply panning, attenuation and doppler.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_set3dconeorientation" title="Sets the orientation of a 3D cone shape, used for simulated occlusion.">ChannelControl::set3DConeOrientation</a> Sets the orientation of a 3D cone shape, used for simulated occlusion.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_get3dconeorientation" title="Retrieves the orientation of a 3D cone shape, used for simulated occlusion.">ChannelControl::get3DConeOrientation</a> Retrieves the orientation of a 3D cone shape, used for simulated occlusion.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_set3dconesettings" title="Sets the angles and attenuation levels of a 3D cone shape, for simulated occlusion which is based on direction.">ChannelControl::set3DConeSettings</a> Sets the angles and attenuation levels of a 3D cone shape, for simulated occlusion which is based on direction.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_get3dconesettings" title="Retrieves the angles and attenuation levels of a 3D cone shape, for simulated occlusion which is based on direction.">ChannelControl::get3DConeSettings</a> Retrieves the angles and attenuation levels of a 3D cone shape, for simulated occlusion which is based on direction.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_set3dcustomrolloff" title="Sets a custom roll-off shape for 3D distance attenuation.">ChannelControl::set3DCustomRolloff</a> Sets a custom roll-off shape for 3D distance attenuation.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_get3dcustomrolloff" title="Retrieves the current custom roll-off shape for 3D distance attenuation.">ChannelControl::get3DCustomRolloff</a> Retrieves the current custom roll-off shape for 3D distance attenuation.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_set3ddistancefilter" title="Sets an override value for the 3D distance filter.">ChannelControl::set3DDistanceFilter</a> Sets an override value for the 3D distance filter.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_get3ddistancefilter" title="Retrieves the override values for the 3D distance filter.">ChannelControl::get3DDistanceFilter</a> Retrieves the override values for the 3D distance filter.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_set3ddopplerlevel" title="Sets the amount by which doppler is scaled.">ChannelControl::set3DDopplerLevel</a> Sets the amount by which doppler is scaled.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_get3ddopplerlevel" title="Retrieves the amount by which doppler is scaled.">ChannelControl::get3DDopplerLevel</a> Retrieves the amount by which doppler is scaled.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_set3dlevel" title="Sets the blend between 3D panning and 2D panning.">ChannelControl::set3DLevel</a> Sets the blend between 3D panning and 2D panning.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_get3dlevel" title="Retrieves the blend between 3D panning and 2D panning.">ChannelControl::get3DLevel</a> Retrieves the blend between 3D panning and 2D panning.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_set3dminmaxdistance" title="Sets the minimum and maximum distances used to calculate the 3D roll-off attenuation.">ChannelControl::set3DMinMaxDistance</a> Sets the minimum and maximum distances used to calculate the 3D roll-off attenuation.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_get3dminmaxdistance" title="Retrieves the minimum and maximum distances used to calculate the 3D roll-off attenuation.">ChannelControl::get3DMinMaxDistance</a> Retrieves the minimum and maximum distances used to calculate the 3D roll-off attenuation.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_set3docclusion" title="Sets the 3D attenuation factors for the direct and reverb paths.">ChannelControl::set3DOcclusion</a> Sets the 3D attenuation factors for the direct and reverb paths.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_get3docclusion" title="Retrieves the 3D attenuation factors for the direct and reverb paths.">ChannelControl::get3DOcclusion</a> Retrieves the 3D attenuation factors for the direct and reverb paths.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_set3dspread" title="Sets the spread of a 3D sound in speaker space.">ChannelControl::set3DSpread</a> Sets the spread of a 3D sound in speaker space.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_get3dspread" title="Retrieves the spread of a 3D sound in speaker space.">ChannelControl::get3DSpread</a> Retrieves the spread of a 3D sound in speaker space.</span></li>
</ul>
<p><strong>Panning and level adjustment:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setpan" title="Sets the left/right pan level.">ChannelControl::setPan</a> Sets the left/right pan level.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setmixlevelsinput" title="Sets the incoming volume level for each channel of a multi-channel signal.">ChannelControl::setMixLevelsInput</a> Sets the incoming volume level for each channel of a multi-channel <a href="glossary.html#signal">signal</a>.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setmixlevelsoutput" title="Sets the outgoing volume levels for each speaker.">ChannelControl::setMixLevelsOutput</a> Sets the outgoing volume levels for each speaker.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setmixmatrix" title="Sets a two-dimensional pan matrix that maps the signal from input channels (columns) to output speakers (rows).">ChannelControl::setMixMatrix</a> Sets a two-dimensional pan matrix that maps the <a href="glossary.html#signal">signal</a> from input channels (columns) to output speakers (rows).</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getmixmatrix" title="Retrieves a 2 dimensional pan matrix that maps the signal from input channels (columns) to output speakers (rows).">ChannelControl::getMixMatrix</a> Retrieves a 2 dimensional pan matrix that maps the <a href="glossary.html#signal">signal</a> from input channels (columns) to output speakers (rows).</span></li>
</ul>
<p><strong>Filtering:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setreverbproperties" title="Sets the wet / send level for a particular reverb instance.">ChannelControl::setReverbProperties</a> Sets the wet / send level for a particular reverb instance.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getreverbproperties" title="Retrieves the wet / send level for a particular reverb instance.">ChannelControl::getReverbProperties</a> Retrieves the wet / send level for a particular reverb instance.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setlowpassgain" title="Sets the gain of the dry signal when built in lowpass / distance filtering is applied.">ChannelControl::setLowPassGain</a> Sets the gain of the dry <a href="glossary.html#signal">signal</a> when built in lowpass / distance filtering is applied.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getlowpassgain" title="Retrieves the gain of the dry signal when built in lowpass / distance filtering is applied.">ChannelControl::getLowPassGain</a> Retrieves the gain of the dry <a href="glossary.html#signal">signal</a> when built in lowpass / distance filtering is applied.</span></li>
</ul>
<p><strong>DSP chain configuration:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_adddsp" title="Adds a DSP unit to the specified index in the DSP chain.">ChannelControl::addDSP</a> Adds a <a href="glossary.html#dsp">DSP unit</a> to the specified index in the <a href="glossary.html#dsp-chain">DSP chain</a>.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_removedsp" title="Removes the specified DSP unit from the DSP chain.">ChannelControl::removeDSP</a> Removes the specified <a href="glossary.html#dsp">DSP unit</a> from the <a href="glossary.html#dsp-chain">DSP chain</a>.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getnumdsps" title="Retrieves the number of DSP units in the DSP chain.">ChannelControl::getNumDSPs</a> Retrieves the number of <a href="glossary.html#dsp">DSP units</a> in the <a href="glossary.html#dsp-chain">DSP chain</a>.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getdsp" title="Retrieves the DSP unit at the specified index in the DSP chain.">ChannelControl::getDSP</a> Retrieves the <a href="glossary.html#dsp">DSP unit</a> at the specified index in the <a href="glossary.html#dsp-chain">DSP chain</a>.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setdspindex" title="Sets the index in the DSP chain of the specified DSP.">ChannelControl::setDSPIndex</a> Sets the index in the <a href="glossary.html#dsp-chain">DSP chain</a> of the specified <a href="glossary.html#dsp">DSP</a>.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getdspindex" title="Retrieves the index of a DSP inside the Channel or ChannelGroup's DSP chain.">ChannelControl::getDSPIndex</a> Retrieves the index of a <a href="glossary.html#dsp">DSP</a> inside the <a href="core-api-channel.html">Channel</a> or <a href="core-api-channelgroup.html">ChannelGroup</a>'s <a href="glossary.html#dsp-chain">DSP chain</a>.</span></li>
</ul>
<p><strong>Sample accurate scheduling:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getdspclock" title="Retrieves the DSP clock values at this point in time.">ChannelControl::getDSPClock</a> Retrieves the <a href="glossary.html#dsp-clock">DSP clock</a> values at this point in time.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setdelay" title="Sets a sample accurate start (and/or stop) time relative to the parent ChannelGroup DSP clock.">ChannelControl::setDelay</a> Sets a sample accurate start (and/or stop) time relative to the parent ChannelGroup <a href="glossary.html#dsp-clock">DSP clock</a>.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getdelay" title="Retrieves a sample accurate start (and/or stop) time relative to the parent ChannelGroup DSP clock.">ChannelControl::getDelay</a> Retrieves a sample accurate start (and/or stop) time relative to the parent ChannelGroup <a href="glossary.html#dsp-clock">DSP clock</a>.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_addfadepoint" title="Adds a sample accurate fade point at a time relative to the parent ChannelGroup DSP clock.">ChannelControl::addFadePoint</a> Adds a sample accurate fade point at a time relative to the parent ChannelGroup <a href="glossary.html#dsp-clock">DSP clock</a>.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setfadepointramp" title="Adds a volume ramp at the specified time in the future using fade points.">ChannelControl::setFadePointRamp</a> Adds a volume ramp at the specified time in the future using fade points.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_removefadepoints" title="Removes all fade points between the two specified clock values (inclusive).">ChannelControl::removeFadePoints</a> Removes all fade points between the two specified clock values (inclusive).</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getfadepoints" title="Retrieves information about stored fade points.">ChannelControl::getFadePoints</a> Retrieves information about stored fade points.</span></li>
</ul>
<p><strong>General:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setcallback" title="Sets the callback for ChannelControl level notifications.">ChannelControl::setCallback</a> Sets the callback for ChannelControl level notifications.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setuserdata" title="Sets a user value associated with this object.">ChannelControl::setUserData</a> Sets a user value associated with this object.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getuserdata" title="Retrieves a user value associated with this object.">ChannelControl::getUserData</a> Retrieves a user value associated with this object.</span></li>
<li><span><a class="apilink" href="core-api-channelcontrol.html#channelcontrol_getsystemobject" title="Retrieves the System that created this object.">ChannelControl::getSystemObject</a> Retrieves the System that created this object.</span></li>
</ul>
<h2 api="function" id="channelgroup_addgroup"><a href="#channelgroup_addgroup">ChannelGroup::addGroup</a></h2>
<p>Adds a ChannelGroup as an input to this group.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">ChannelGroup</span><span class="o">::</span><span class="n">addGroup</span><span class="p">(</span>
<span class="n">ChannelGroup</span> <span class="o">*</span><span class="n">group</span><span class="p">,</span>
<span class="kt">bool</span> <span class="n">propagatedspclock</span> <span class="o">=</span> <span class="nb">true</span><span class="p">,</span>
<span class="n">DSPConnection</span> <span class="o">**</span><span class="n">connection</span> <span class="o">=</span> <span class="k">nullptr</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_ChannelGroup_AddGroup</span><span class="p">(</span>
<span class="n">FMOD_CHANNELGROUP</span> <span class="o">*</span><span class="n">channelgroup</span><span class="p">,</span>
<span class="n">FMOD_CHANNELGROUP</span> <span class="o">*</span><span class="n">group</span><span class="p">,</span>
<span class="n">FMOD_BOOL</span> <span class="n">propagatedspclock</span><span class="p">,</span>
<span class="n">FMOD_DSPCONNECTION</span> <span class="o">**</span><span class="n">connection</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">ChannelGroup</span><span class="p">.</span><span class="n">addGroup</span><span class="p">(</span>
<span class="n">ChannelGroup</span> <span class="k">group</span><span class="p">,</span>
<span class="kt">bool</span> <span class="n">propagatedspclock</span> <span class="p">=</span> <span class="k">true</span>
<span class="p">);</span>
<span class="n">RESULT</span> <span class="n">ChannelGroup</span><span class="p">.</span><span class="n">addGroup</span><span class="p">(</span>
<span class="n">ChannelGroup</span> <span class="k">group</span><span class="p">,</span>
<span class="kt">bool</span> <span class="n">propagatedspclock</span><span class="p">,</span>
<span class="k">out</span> <span class="n">DSPConnection</span> <span class="n">connection</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">ChannelGroup</span><span class="p">.</span><span class="nx">addGroup</span><span class="p">(</span>
<span class="nx">group</span><span class="p">,</span>
<span class="nx">propagatedspclock</span><span class="p">,</span>
<span class="nx">connection</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>group</dt>
<dd>Group to add. (<a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a>)</dd>
<dt>propagatedspclock</dt>
<dd>
<p>Recursively propagate this object's clock values to <code>group</code>.</p>
<ul>
<li><span class="label">Units:</span> Boolean</li>
</ul>
</dd>
<dt>connection <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a><a class="token" href="glossary.html#documentation-conventions" title="Optional">Opt</a></span></dt>
<dd>Connection between the head <a class="apilink" href="core-api-dsp.html">DSP</a> of <code>group</code> and the tail <a class="apilink" href="core-api-dsp.html">DSP</a> of this object. (<a class="apilink" href="core-api-dspconnection.html">DSPConnection</a>)</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-channelgroup.html#channelgroup_getnumgroups">ChannelGroup::getNumGroups</a>, <a class="apilink" href="core-api-channelgroup.html#channelgroup_getgroup">ChannelGroup::getGroup</a>, <a class="apilink" href="core-api-channelgroup.html#channelgroup_getparentgroup">ChannelGroup::getParentGroup</a></p>
<h2 api="function" id="channelgroup_getchannel"><a href="#channelgroup_getchannel">ChannelGroup::getChannel</a></h2>
<p>Retrieves the Channel at the specified index in the list of Channel inputs.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">ChannelGroup</span><span class="o">::</span><span class="n">getChannel</span><span class="p">(</span>
<span class="kt">int</span> <span class="n">index</span><span class="p">,</span>
<span class="n">Channel</span> <span class="o">**</span><span class="n">channel</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_ChannelGroup_GetChannel</span><span class="p">(</span>
<span class="n">FMOD_CHANNELGROUP</span> <span class="o">*</span><span class="n">channelgroup</span><span class="p">,</span>
<span class="kt">int</span> <span class="n">index</span><span class="p">,</span>
<span class="n">FMOD_CHANNEL</span> <span class="o">**</span><span class="n">channel</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">ChannelGroup</span><span class="p">.</span><span class="n">getChannel</span><span class="p">(</span>
<span class="kt">int</span> <span class="n">index</span><span class="p">,</span>
<span class="k">out</span> <span class="n">Channel</span> <span class="n">channel</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">ChannelGroup</span><span class="p">.</span><span class="nx">getChannel</span><span class="p">(</span>
<span class="nx">index</span><span class="p">,</span>
<span class="nx">channel</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>index</dt>
<dd>
<p>Offset into the list of <a class="apilink" href="core-api-channel.html">Channel</a> inputs.</p>
<ul>
<li><span class="label">Range:</span> [0, <a class="apilink" href="core-api-channelgroup.html#channelgroup_getnumchannels">ChannelGroup::getNumChannels</a>)</li>
</ul>
</dd>
<dt>channel <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>Channel at the specified index. (<a class="apilink" href="core-api-channel.html">Channel</a>)</dd>
</dl>
<h2 api="function" id="channelgroup_getgroup"><a href="#channelgroup_getgroup">ChannelGroup::getGroup</a></h2>
<p>Retrieves the ChannelGroup at the specified index in the list of group inputs.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">ChannelGroup</span><span class="o">::</span><span class="n">getGroup</span><span class="p">(</span>
<span class="kt">int</span> <span class="n">index</span><span class="p">,</span>
<span class="n">ChannelGroup</span> <span class="o">**</span><span class="n">group</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_ChannelGroup_GetGroup</span><span class="p">(</span>
<span class="n">FMOD_CHANNELGROUP</span> <span class="o">*</span><span class="n">channelgroup</span><span class="p">,</span>
<span class="kt">int</span> <span class="n">index</span><span class="p">,</span>
<span class="n">FMOD_CHANNELGROUP</span> <span class="o">**</span><span class="n">group</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">ChannelGroup</span><span class="p">.</span><span class="n">getGroup</span><span class="p">(</span>
<span class="kt">int</span> <span class="n">index</span><span class="p">,</span>
<span class="k">out</span> <span class="n">ChannelGroup</span> <span class="k">group</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">ChannelGroup</span><span class="p">.</span><span class="nx">getGroup</span><span class="p">(</span>
<span class="nx">index</span><span class="p">,</span>
<span class="nx">group</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>index</dt>
<dd>
<p>Offset into the list of group inputs.</p>
<ul>
<li><span class="label">Range:</span> [0, <a class="apilink" href="core-api-channelgroup.html#channelgroup_getnumgroups">ChannelGroup::getNumGroups</a>)</li>
</ul>
</dd>
<dt>group <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>Group at the specified index. (<a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a>)</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-channelgroup.html#channelgroup_addgroup">ChannelGroup::addGroup</a>, <a class="apilink" href="core-api-channelgroup.html#channelgroup_getparentgroup">ChannelGroup::getParentGroup</a></p>
<h2 api="function" id="channelgroup_getname"><a href="#channelgroup_getname">ChannelGroup::getName</a></h2>
<p>Retrieves the name set when the group was created.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">ChannelGroup</span><span class="o">::</span><span class="n">getName</span><span class="p">(</span>
<span class="kt">char</span> <span class="o">*</span><span class="n">name</span><span class="p">,</span>
<span class="kt">int</span> <span class="n">namelen</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_ChannelGroup_GetName</span><span class="p">(</span>
<span class="n">FMOD_CHANNELGROUP</span> <span class="o">*</span><span class="n">channelgroup</span><span class="p">,</span>
<span class="kt">char</span> <span class="o">*</span><span class="n">name</span><span class="p">,</span>
<span class="kt">int</span> <span class="n">namelen</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">ChannelGroup</span><span class="p">.</span><span class="n">getName</span><span class="p">(</span>
<span class="k">out</span> <span class="kt">string</span> <span class="n">name</span><span class="p">,</span>
<span class="kt">int</span> <span class="n">namelen</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">ChannelGroup</span><span class="p">.</span><span class="nx">getName</span><span class="p">(</span>
<span class="nx">name</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>name <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>Name of the group. (<a href="glossary.html#string-format">UTF-8 string</a>)</dd>
<dt>namelen</dt>
<dd>
<p>Length of <code>name</code>.</p>
<ul>
<li><span class="label">Units:</span> Bytes</li>
</ul>
</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-system.html#system_getmasterchannelgroup">System::getMasterChannelGroup</a>, <a class="apilink" href="core-api-system.html#system_createchannelgroup">System::createChannelGroup</a></p>
<h2 api="function" id="channelgroup_getnumchannels"><a href="#channelgroup_getnumchannels">ChannelGroup::getNumChannels</a></h2>
<p>Retrieves the number of Channels that feed into to this group.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">ChannelGroup</span><span class="o">::</span><span class="n">getNumChannels</span><span class="p">(</span>
<span class="kt">int</span> <span class="o">*</span><span class="n">numchannels</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_ChannelGroup_GetNumChannels</span><span class="p">(</span>
<span class="n">FMOD_CHANNELGROUP</span> <span class="o">*</span><span class="n">channelgroup</span><span class="p">,</span>
<span class="kt">int</span> <span class="o">*</span><span class="n">numchannels</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">ChannelGroup</span><span class="p">.</span><span class="n">getNumChannels</span><span class="p">(</span>
<span class="k">out</span> <span class="kt">int</span> <span class="n">numchannels</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">ChannelGroup</span><span class="p">.</span><span class="nx">getNumChannels</span><span class="p">(</span>
<span class="nx">numchannels</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>numchannels <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>Number of <a class="apilink" href="core-api-channel.html">Channel</a>s.</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-channelgroup.html#channelgroup_getchannel">ChannelGroup::getChannel</a></p>
<h2 api="function" id="channelgroup_getnumgroups"><a href="#channelgroup_getnumgroups">ChannelGroup::getNumGroups</a></h2>
<p>Retrieves the number of ChannelGroups that feed into to this group.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">ChannelGroup</span><span class="o">::</span><span class="n">getNumGroups</span><span class="p">(</span>
<span class="kt">int</span> <span class="o">*</span><span class="n">numgroups</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_ChannelGroup_GetNumGroups</span><span class="p">(</span>
<span class="n">FMOD_CHANNELGROUP</span> <span class="o">*</span><span class="n">channelgroup</span><span class="p">,</span>
<span class="kt">int</span> <span class="o">*</span><span class="n">numgroups</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">ChannelGroup</span><span class="p">.</span><span class="n">getNumGroups</span><span class="p">(</span>
<span class="k">out</span> <span class="kt">int</span> <span class="n">numgroups</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">ChannelGroup</span><span class="p">.</span><span class="nx">getNumGroups</span><span class="p">(</span>
<span class="nx">numgroups</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>numgroups <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>Number of <a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a>s.</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-channelgroup.html#channelgroup_addgroup">ChannelGroup::addGroup</a>, <a class="apilink" href="core-api-channelgroup.html#channelgroup_getgroup">ChannelGroup::getGroup</a>, <a class="apilink" href="core-api-channelgroup.html#channelgroup_getparentgroup">ChannelGroup::getParentGroup</a></p>
<h2 api="function" id="channelgroup_getparentgroup"><a href="#channelgroup_getparentgroup">ChannelGroup::getParentGroup</a></h2>
<p>Retrieves the ChannelGroup this object outputs to.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">ChannelGroup</span><span class="o">::</span><span class="n">getParentGroup</span><span class="p">(</span>
<span class="n">ChannelGroup</span> <span class="o">**</span><span class="n">group</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_ChannelGroup_GetParentGroup</span><span class="p">(</span>
<span class="n">FMOD_CHANNELGROUP</span> <span class="o">*</span><span class="n">channelgroup</span><span class="p">,</span>
<span class="n">FMOD_CHANNELGROUP</span> <span class="o">**</span><span class="n">group</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">ChannelGroup</span><span class="p">.</span><span class="n">getParentGroup</span><span class="p">(</span>
<span class="k">out</span> <span class="n">ChannelGroup</span> <span class="k">group</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">ChannelGroup</span><span class="p">.</span><span class="nx">getParentGroup</span><span class="p">(</span>
<span class="nx">group</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>group <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>Output group. (<a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a>)</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-channelgroup.html#channelgroup_addgroup">ChannelGroup::addGroup</a>, <a class="apilink" href="core-api-channelgroup.html#channelgroup_getnumgroups">ChannelGroup::getNumGroups</a>, <a class="apilink" href="core-api-channelgroup.html#channelgroup_getgroup">ChannelGroup::getGroup</a></p>
<h2 api="function" id="channelgroup_release"><a href="#channelgroup_release">ChannelGroup::release</a></h2>
<p>Frees the memory for the group.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">ChannelGroup</span><span class="o">::</span><span class="n">release</span><span class="p">();</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_ChannelGroup_Release</span><span class="p">(</span><span class="n">FMOD_CHANNELGROUP</span> <span class="o">*</span><span class="n">channelgroup</span><span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">ChannelGroup</span><span class="p">.</span><span class="n">release</span><span class="p">();</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">ChannelGroup</span><span class="p">.</span><span class="nx">release</span><span class="p">();</span>
</pre></div>
<p>Any <a class="apilink" href="core-api-channel.html">Channel</a>s or <a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a>s feeding into this group are moved to the master <a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a>.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-system.html#system_createchannelgroup">System::createChannelGroup</a>, <a class="apilink" href="core-api-system.html#system_getmasterchannelgroup">System::getMasterChannelGroup</a></p></div>
<p class="manual-footer">FMOD Engine User Manual 2.03.13 (2026-03-31). &copy; 2026 Firelight Technologies Pty Ltd.</p>
</div>
</body>
</html>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,116 @@
<html>
<head>
<title>Core API Key Concepts</title>
<link rel="stylesheet" href="style/docs.css">
<link rel="stylesheet" href="style/code_highlight.css">
<script type="text/javascript" src="scripts/language-selector.js"></script></head>
<body>
<div class="docs-body">
<div class="manual-toc">
<p>FMOD Engine User Manual 2.03</p>
<ul>
<li><a href="welcome.html">Welcome to the FMOD Engine</a></li>
<li class="manual-current-chapter manual-active-chapter"><a href="core-api-concepts.html">Core API Key Concepts</a><ul>
<li><a href="#the-core-api-and-the-fmod-engine">The Core API and the FMOD Engine</a></li>
<li><a href="#the-system-object">The System Object</a></li>
<li><a href="#sounds">Sounds</a></li>
<li><a href="#channels">Channels</a><ul>
<li><a href="#channel-virtualization">Channel Virtualization</a></li>
</ul>
</li>
<li><a href="#channel-groups">Channel Groups</a></li>
<li><a href="#dsp-units">DSP Units</a></li>
<li><a href="#fmod-sound-banks">FMOD Sound Banks</a></li>
<li><a href="#3d-sounds-and-channels">3D Sounds and Channels</a></li>
<li><a href="#streams">Streams</a></li>
<li><a href="#audio-devices">Audio Devices</a></li>
</ul>
</li>
<li><a href="running-the-core-api.html">Core API Getting Started</a></li>
<li><a href="loading-and-playing-sounds-in-the-core-api.html">Core API Loading and Playing Sounds</a></li>
<li><a href="spatializing-sounds-in-the-core-api.html">Core API Spatializing Sounds</a></li>
<li><a href="mixing-and-routing-in-the-core-api.html">Core API Mixing and Routing</a></li>
<li><a href="using-dsp-effects-in-the-core-api.html">Core API Using DSP Effects</a></li>
<li><a href="effects-reference.html">Core API Effect Reference</a></li>
<li><a href="managing-resources-in-the-core-api.html">Core API Managing Resources</a></li>
<li><a href="advanced-core-api-topics.html">Core API Advanced Topics</a></li>
<li><a href="core-api.html">Core API Reference</a></li>
<li><a href="studio-api-getting-started.html">Studio API Getting Started</a></li>
<li><a href="studio-guide.html">Studio API Guide</a></li>
<li><a href="studio-api-3d-events.html">Studio API 3D Events</a></li>
<li><a href="studio-api-threads.html">Studio API Threads</a></li>
<li><a href="studio-api.html">Studio API Reference</a></li>
<li><a href="platforms.html">Platform Details</a></li>
<li><a href="dsp-plugin-api-guide.html">Plug-in DSP API Guide</a></li>
<li><a href="plugin-api.html">Plug-in API Reference</a></li>
<li><a href="fsbank-api.html">FSBank API Reference</a></li>
<li><a href="troubleshooting.html">Troubleshooting</a></li>
<li><a href="glossary.html">Glossary</a></li>
</ul>
</div>
<div class="manual-content api">
<h1>2. Core API Key Concepts</h1>
<p>The <a href="glossary.html#core-api">Core API</a> is a programmer API that allows the manipulation of low-level audio primitives, and is the backbone of the <a href="glossary.html#fmod-studio">FMOD Engine</a>.</p>
<p>While the <a href="glossary.html#studio-api">Studio API</a> is easy to use and well-suited to most game projects, the Core API is both more powerful and more flexible. This makes it useful for games with unusual and strict audio requirements that do not perfectly fit into the Studio API's paradigm of events and buses. In addition, even games made using the Studio API can benefit from a solid knowledge of the Core API, as the Core API is the foundation upon which the Studio API is built.</p>
<p>This chapter introduces several essential FMOD Core API concepts. Understanding these concepts and how they interact is key to understanding how best to use the Core API to develop adaptive game audio.</p>
<p>This chapter is designed to be read before proceeding on to the rest of this manual, as the concepts introduced here come up frequently in later chapters.</p>
<h2 id="the-core-api-and-the-fmod-engine"><a href="#the-core-api-and-the-fmod-engine">2.1 The Core API and the FMOD Engine</a></h2>
<p>The <a href="glossary.html#fmod-engine">FMOD Engine</a> is a runtime library for playing adaptive audio in games. It consists of two APIs: <a href="glossary.html#studio-api">FMOD Studio API</a>, and the <a href="glossary.html#core-api">FMOD Core API</a>.</p>
<p>The FMOD Core API allows audio programmers to create audio content without using FMOD Studio, and to interact with the FMOD Engine's underlying mechanisms. This makes it more powerful and flexible than the FMOD Studio API.</p>
<p>The FMOD Studio API can load and play <a href="glossary.html#bank-file">.bank files</a> created in FMOD Studio, an application that allows sound designers and composers to create adaptive audio content for games. This makes it less flexible than the FMOD Core API, but easier to use, especially for sound designers with limited audio programming experience and audio programmers with limited experience of sound design.</p>
<p><a href="glossary.html#fmod-for-unity">FMOD for Unity</a> and <a href="glossary.html#fmod-for-unreal-engine">FMOD for Unreal Engine</a> are packaged software integrations of the FMOD Engine for use in Unity and Unreal Engine games. Each package includes a copy of the FMOD Engine that is automatically installed along with the integration.</p>
<p><a href="glossary.html#version">FMOD version numbers</a> are split into three parts, in the format: <em>productVersion.majorVersion.minorVersion.</em></p>
<h2 id="the-system-object"><a href="#the-system-object">2.2 The System Object</a></h2>
<p>The FMOD <a href="glossary.html#system">system object</a> is the heart of the <a href="glossary.html#fmod-engine">FMOD Engine</a>, the key mechanism that all other <a href="glossary.html#core-api">Core API</a> features depend on to work. This means that before your game can do anything else with the Core API, the system object needs to be created. Outside of exceptional circumstances, you only ever need one FMOD system object to handle all the audio in your game. Most games therefore create a system object when the game is launched, and then only destroy that system object when the player quits the game.</p>
<p>For information about getting your game ready to play audio with the FMOD Core API, see the <a href="running-the-core-api.html">Running the Core API</a> chapter. For more information about the system object, see <a href="core-api-system.html">System</a> subchapter of the <a href="core-api.html">Core API Reference</a> chapter.</p>
<h2 id="sounds"><a href="#sounds">2.3 Sounds</a></h2>
<p>A <a href="glossary.html#sound">sound</a> is a piece of sample data that's loaded or buffered into memory, ready to be played. Sounds are created using <a href="core-api-system.html#system_createstream">System::createStream</a> or <a href="core-api-system.html#system_createsound">System::createSound</a>, which also lets you choose the <a href="glossary.html#loading-mode">loading mode</a> to be used for that sound.</p>
<p>Once a sound is loaded, you can play it with <a href="core-api-system.html#system_playsound">System::playSound</a>. This creates a <a href="glossary.html#channel">channel</a> that plays the sound's sample data.</p>
<p>For more information about loading and playing sounds, see the <a href="loading-and-playing-sounds-in-the-core-api.html">Loading and Playing Sounds in the Core API</a> chapter. For reference information about sounds, see the <a href="core-api-sound.html">Sound</a> subchapter of the <a href="core-api.html">Core API Reference</a> chapter.</p>
<h2 id="channels"><a href="#channels">2.4 Channels</a></h2>
<p>A <a href="glossary.html#channel">channel</a> can be thought of as a single "voice" in your game's mix. Each channel is the source of an audio signal, which it routes into the <a href="glossary.html#dsp-graph">DSP graph</a> to be mixed.</p>
<p>Provided the <a href="glossary.html#sound">sound</a> isn't a <a href="glossary.html#stream">stream</a>, you can play multiple channels based on the same sound contemporaneously, without needing to create multiple instances of that sound. Calling <code>System::playSound</code> again while one or more channels based on that sound is already playing creates and plays a new channel based on that sound, without stopping the already-playing channels. This allows you to save resources by only keeping one copy of a sound in memory, no matter how many instances of that sound you need to play.</p>
<p>If a sound is a stream (which is to say, if it was created by with <code>System::createStream</code> or by calling <code>System::createSound</code> with FMOD_CREATESTREAM), calling <code>System::playSound</code> while a channel based on that sound is already playing instead causes it to restart. If you want to play multiple instances of a streaming sound's sample data, you can do so by creating multiple sounds based on the same sample data, and playing each one separately.</p>
<p>For more information about channels, see the <a href="core-api-channel.html">Channel</a> subchapter of the <a href="core-api.html">Core API Reference</a> chapter.</p>
<h3 id="channel-virtualization"><a href="#channel-virtualization">2.4.1 Channel Virtualization</a></h3>
<p>Channels don't necessarily consume resources while they're playing. If a channel falls silent, or if it's the quietest channel when there are too many channels playing, it can be "virtualized." Virtualized channels are abstracted away so that they don't consume resources; if they subsequently become loud enough that they should be audible, or if the number of playing channels drops back down below the limit, they stop being virtual and resume playing as if they had never stopped. Because channels are only virtualized if they're silent or quieter than all other non-virtual channels, this normally has no apparent effect on how the game sounds, but helps save a lot of resources.</p>
<p>For more information about virtualization, see the <a href="managing-resources-in-the-core-api.html#virtual-voice-system">Virtual Voice System</a> section of the <a href="managing-resources-in-the-core-api.html">Managing Resources in the Core API</a> chapter.</p>
<h2 id="channel-groups"><a href="#channel-groups">2.5 Channel Groups</a></h2>
<p>A <a href="glossary.html#channel-group">channel group</a> functions as a container for <a href="glossary.html#channel">channels</a> and other channel groups. Each channel group creates a submix of the <a href="glossary.html#signal">signals</a> output by the channels and channel groups it contains. This means that you can treat channel groups like buses, routing other channels and channel groups into them in order to better control your mix, and putting DSPs on them to process and modify their submixes.</p>
<p>While it is possible to put <a href="glossary.html#dsp">DSPs</a> onto channels, it's usually more resource-efficient to put them onto channel groups, as doing so allows a single DSP unit to process the submixed output of multiple channels.</p>
<p>For more information about channel groups, see the <a href="core-api-channelgroup.html">ChannelGroup</a> section of the <a href="core-api.html">Core API Reference</a> chapter.</p>
<h2 id="dsp-units"><a href="#dsp-units">2.6 DSP Units</a></h2>
<p>A <a href="glossary.html#dsp">DSP</a> (or Digital Signal Processor) unit takes PCM audio input and transforms it to create PCM audio output. DSPs are sometimes called <a href="glossary.html#effect">effects</a>.</p>
<p>Commonly-used DSPs include the <a href="effects-reference.html#pan">panner</a>, which is used to spatialize and pan signals, and the <a href="effects-reference.html#fader">fader</a>, which is used to adjust volume.</p>
<p>DSPs are usually applied to <a href="glossary.html#channel-group">channel groups</a> in order to modify their submixes in various ways, though they can also be applied to <a href="glossary.html#channel">channels</a>. Multiple DSPs can be applied to the same channel group or channel.</p>
<p>For more information about using DSPs, see the <a href="using-dsp-effects-in-the-core-api.html">Using DSP Effects in the Core API</a> chapter. For more information about specific DSPs, see the <a href="effects-reference.html">Effects Reference</a> chapter.</p>
<h2 id="fmod-sound-banks"><a href="#fmod-sound-banks">2.7 FMOD Sound Banks</a></h2>
<p>While the FMOD Core API can play loose audio files in <a href="core-api-sound.html#fmod_sound_type">a variety of formats</a>, it can also load and play <a href="glossary.html#fsb">.fsb files</a>. .fsb files, also known as FMOD sound banks, are a container format optimized for loading and playing <a href="glossary.html#sound">sounds</a> in games. You can create FSB files for your game by using the fsbank.exe and fsbankcl.exe applications that comes included with the FMOD Engine.</p>
<p>.fsb files provide a number of benefits over other audio file formats, including:</p>
<ul>
<li><strong>No-seek loading.</strong> FSB loading supports three continuous file reads: A main header read, a <span class="dead-link" href="glossary.html#sub-sound">sub-sound</span class="dead-link"> metadata read, and a raw audio data read.</li>
<li><strong>Memory points.</strong> An FSB can be loaded into memory and simply 'pointed to' so that FMOD uses the memory where it is, and does not allocate any extra memory. See <a class="apilink" href="core-api-common.html#fmod_openmemory_point">FMOD_OPENMEMORY_POINT</a>.</li>
<li><strong>Low memory overhead.</strong> A lot of file formats contain fluff such as tags and metadata. FSB stores information in compressed, bit packed formats with minimal overhead for optimum efficiency.</li>
<li><strong>Multiple sounds in one file.</strong> Thousands of sounds can be stored inside one .fsb file, and selected by the API function <a class="apilink" href="core-api-sound.html#sound_getsubsound">Sound::getSubSound</a>. Because a single .fsb file can include the sample data used by multiple different sounds, .fsb files can also function as loading units for your game's sample data. As loading an .fsb file that contains the sample data for multiple different sounds requires involves less overhead than loading the sample data for all of those sounds individually, this saves resources in any situation where multiple different sounds' sample data would need to be loaded at the same time.</li>
<li><strong>Efficient Ogg Vorbis.</strong> FSB strips out the 'Ogg' and keeps the 'Vorbis'. This means that one codebook can be shared between all sounds, saving megabytes of memory compared to loading .ogg files individually.</li>
<li><strong>FADPCM codec support.</strong> The FMOD Engine supports a very efficient ADPCM variant called FADPCM. This variant is many times faster than a standard ADPCM decoder as it does not require branching, and is therefore very efficient on mobile devices. The quality is also far superior than most ADPCM variants, and lacks the 'hiss' notable in those formats.</li>
</ul>
<p>For more information about FMOD sound banks, see the <a href="loading-and-playing-sounds-in-the-core-api.html#supported-file-formats">Supported File Formats</a> section of the <a href="loading-and-playing-sounds-in-the-core-api.html">Loading and Playing Sounds in the Core API</a> chapter.</p>
<h2 id="3d-sounds-and-channels"><a href="#3d-sounds-and-channels">2.8 3D Sounds and Channels</a></h2>
<p>A 3D <a href="glossary.html#channel">channel</a> or 3D <a href="glossary.html#channel-group">channel group</a> is created with the <a href="core-api-common.html#fmod_3d">FMOD_3D</a> flag. This flag allows a channel or channel group to have a defined position, orientation, and velocity in 3D space, set by <a href="core-api-channelcontrol.html#channelcontrol_set3dattributes">ChannelControl::set3DAttributes</a>. These 3D attributes can be used by <a href="glossary.html#dsp">DSPs</a> on that channel or channel group, allowing them to process the signal of that channel or channel group in different ways depending on the 3D attributes' values. The most common reason for making a channel or channel group 3D is to spatialize it with a <a href="effects-reference.html#pan">panner effect</a>, panning and attenuating the <a href="glossary.html#signal">signal</a> to make it seem to come from a specific direction and distance.</p>
<p><a href="glossary.html#sound">Sounds</a> can be set to 2D or 3D as well, by specifying the FMOD_3D flag when creating them with <a href="core-api-system.html#system_createsound">System::createSound</a>. In most cases, this isn't strictly necessary - you can make any channel 2D or 3D, regardless of which of those the sound is - but setting a sound to be 2D or 3D makes that the default for all channels based on that sound.</p>
<h2 id="streams"><a href="#streams">2.9 Streams</a></h2>
<p><a href="glossary.html#stream">Streaming</a> is a way of playing sound without having to load the entire audio asset to be played into memory first. Instead, the sample data is loaded piecemeal into a ring buffer. Each piece of the sample data is loaded into the buffer shortly before it is played and overwritten again as soon as it has finished playing, ensuring that only a tiny amount of the stream's sample data is stored in memory at any given time.</p>
<p>The <a href="glossary.html#fmod-engine">FMOD Engine</a> supports streaming from file, memory, user callbacks, and http/shoutcast/icecast sources.</p>
<p>Streaming <a href="glossary.html#sound">sounds</a> are created using <a href="core-api-system.html#system_createstream">System::createStream</a> or by adding the <code>FMOD_CREATESTREAM</code> flag to <a href="core-api-system.html#system_createsound">System::createSound</a>. Each streaming sound plays exactly one instance of its associated sample data. To play multiple instances of the same piece of sample data as streams, you must open and play a stream multiple times. Each such opened stream is its own sound.</p>
<p>Streaming sounds are mostly used for music and dialogue, though they may be used for other sounds as well.</p>
<h2 id="audio-devices"><a href="#audio-devices">2.10 Audio Devices</a></h2>
<p>An audio device is any piece of hardware that accepts an <a href="glossary.html#signal">audio signal</a> and behaves differently according to the signal it receives.</p>
<p>Most audio devices are designed to produce sound: Speakers, headphones, controller speakers, VoIP headsets, and so on. Some audio devices instead use the audio signals they receive for other purposes. For example, the vibrators in some controllers accept audio data and modulate the intensity and frequency of their vibration based on the data they receive.</p>
<p>The <a href="glossary.html#core-api">Core API</a> is capable of outputting audio signals to audio devices.</p></div>
<p class="manual-footer">FMOD Engine User Manual 2.03.13 (2026-03-31). &copy; 2026 Firelight Technologies Pty Ltd.</p>
</div>
</body>
</html>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,553 @@
<html>
<head>
<title>Core API Reference | DSPConnection</title>
<link rel="stylesheet" href="style/docs.css">
<link rel="stylesheet" href="style/code_highlight.css">
<script type="text/javascript" src="scripts/language-selector.js"></script></head>
<body>
<div class="docs-body">
<div class="manual-toc">
<p>FMOD Engine User Manual 2.03</p>
<ul>
<li><a href="welcome.html">Welcome to the FMOD Engine</a></li>
<li><a href="core-api-concepts.html">Core API Key Concepts</a></li>
<li><a href="running-the-core-api.html">Core API Getting Started</a></li>
<li><a href="loading-and-playing-sounds-in-the-core-api.html">Core API Loading and Playing Sounds</a></li>
<li><a href="spatializing-sounds-in-the-core-api.html">Core API Spatializing Sounds</a></li>
<li><a href="mixing-and-routing-in-the-core-api.html">Core API Mixing and Routing</a></li>
<li><a href="using-dsp-effects-in-the-core-api.html">Core API Using DSP Effects</a></li>
<li><a href="effects-reference.html">Core API Effect Reference</a></li>
<li><a href="managing-resources-in-the-core-api.html">Core API Managing Resources</a></li>
<li><a href="advanced-core-api-topics.html">Core API Advanced Topics</a></li>
<li class="manual-current-chapter manual-inactive-chapter"><a href="core-api.html">Core API Reference</a><ul class="subchapters"><li><a href="core-api-common.html">Common</a></li><li><a href="core-api-common-dsp-effects.html">Effect Parameters</a></li><li><a href="core-api-system.html">System</a></li><li><a href="core-api-sound.html">Sound</a></li><li><a href="core-api-channelcontrol.html">ChannelControl</a></li><li><a href="core-api-channel.html">Channel</a></li><li><a href="core-api-channelgroup.html">ChannelGroup</a></li><li><a href="core-api-soundgroup.html">SoundGroup</a></li><li><a href="core-api-dsp.html">DSP</a></li><li class="manual-current-chapter manual-active-chapter"><a href="core-api-dspconnection.html">DSPConnection</a></li><li><a href="core-api-geometry.html">Geometry</a></li><li><a href="core-api-reverb3d.html">Reverb3D</a></li><li><a href="core-api-platform-ios.html">iOS Specific</a></li><li><a href="core-api-platform-android.html">Android Specific</a></li><li><a href="core-api-platform-html5.html">HTML5 Specific</a></li></ul></li>
<li><a href="studio-api-getting-started.html">Studio API Getting Started</a></li>
<li><a href="studio-guide.html">Studio API Guide</a></li>
<li><a href="studio-api-3d-events.html">Studio API 3D Events</a></li>
<li><a href="studio-api-threads.html">Studio API Threads</a></li>
<li><a href="studio-api.html">Studio API Reference</a></li>
<li><a href="platforms.html">Platform Details</a></li>
<li><a href="dsp-plugin-api-guide.html">Plug-in DSP API Guide</a></li>
<li><a href="plugin-api.html">Plug-in API Reference</a></li>
<li><a href="fsbank-api.html">FSBank API Reference</a></li>
<li><a href="troubleshooting.html">Troubleshooting</a></li>
<li><a href="glossary.html">Glossary</a></li>
</ul>
</div>
<div class="manual-content api">
<h1>11. Core API Reference | DSPConnection</h1>
<p>An interface that manages <a href="glossary.html#dsp">Digital Signal Processor (DSP)</a> connections</p>
<p><strong>Mix Properties:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-dspconnection.html#dspconnection_setmix" title="Sets the connection's volume scale.">DSPConnection::setMix</a> Sets the connection's volume scale.</span></li>
<li><span><a class="apilink" href="core-api-dspconnection.html#dspconnection_getmix" title="Retrieves the connection's volume scale.">DSPConnection::getMix</a> Retrieves the connection's volume scale.</span></li>
<li><span><a class="apilink" href="core-api-dspconnection.html#dspconnection_setmixmatrix" title="Sets a 2 dimensional pan matrix that maps the signal from input channels (columns) to output speakers (rows).">DSPConnection::setMixMatrix</a> Sets a 2 dimensional pan matrix that maps the <a href="glossary.html#signal">signal</a> from input channels (columns) to output speakers (rows).</span></li>
<li><span><a class="apilink" href="core-api-dspconnection.html#dspconnection_getmixmatrix" title="Retrieves a 2 dimensional pan matrix that maps the signal from input channels (columns) to output speakers (rows).">DSPConnection::getMixMatrix</a> Retrieves a 2 dimensional pan matrix that maps the <a href="glossary.html#signal">signal</a> from input channels (columns) to output speakers (rows).</span></li>
</ul>
<p><strong>General:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-dspconnection.html#dspconnection_getinput" title="Retrieves the connection's input DSP unit.">DSPConnection::getInput</a> Retrieves the connection's input <a href="glossary.html#dsp">DSP unit</a>.</span></li>
<li><span><a class="apilink" href="core-api-dspconnection.html#dspconnection_getoutput" title="Retrieves the connection's output DSP unit.">DSPConnection::getOutput</a> Retrieves the connection's output <a href="glossary.html#dsp">DSP unit</a>.</span></li>
<li><span><a class="apilink" href="core-api-dspconnection.html#dspconnection_gettype" title="Retrieves the type of the connection between two DSP units.">DSPConnection::getType</a> Retrieves the type of the connection between two <a href="glossary.html#dsp">DSP units</a>.</span></li>
<li><span><a class="apilink" href="core-api-dspconnection.html#dspconnection_setuserdata" title="Sets a user value associated with this object.">DSPConnection::setUserData</a> Sets a user value associated with this object.</span></li>
<li><span><a class="apilink" href="core-api-dspconnection.html#dspconnection_getuserdata" title="Retrieves a user value associated with this object.">DSPConnection::getUserData</a> Retrieves a user value associated with this object.</span></li>
</ul>
<hr />
<ul>
<li><span><a class="apilink" href="core-api-dspconnection.html#fmod_dspconnection_type" title="List of connection types between two DSP units.">FMOD_DSPCONNECTION_TYPE</a> List of connection types between two <a href="glossary.html#dsp">DSP units</a>.</span></li>
</ul>
<h2 api="function" id="dspconnection_getinput"><a href="#dspconnection_getinput">DSPConnection::getInput</a></h2>
<p>Retrieves the connection's input <a href="glossary.html#dsp">DSP unit</a>.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">DSPConnection</span><span class="o">::</span><span class="n">getInput</span><span class="p">(</span>
<span class="n">DSP</span> <span class="o">**</span><span class="n">input</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_DSPConnection_GetInput</span><span class="p">(</span>
<span class="n">FMOD_DSPCONNECTION</span> <span class="o">*</span><span class="n">dspconnection</span><span class="p">,</span>
<span class="n">FMOD_DSP</span> <span class="o">**</span><span class="n">input</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">DSPConnection</span><span class="p">.</span><span class="n">getInput</span><span class="p">(</span>
<span class="k">out</span> <span class="n">DSP</span> <span class="n">input</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">DSPConnection</span><span class="p">.</span><span class="nx">getInput</span><span class="p">(</span>
<span class="nx">input</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>input <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>Input DSP unit. (<a class="apilink" href="core-api-dsp.html">DSP</a>)</dd>
</dl>
<p>If this function is called very soon after <a class="apilink" href="core-api-dsp.html#dsp_addinput">DSP::addInput</a>, the connection might not be ready because the DSP system is still queued to be connected and may need to wait several milliseconds for the next mix to occur. When this occurs, the function returns <a class="apilink" href="core-api-common.html#fmod_err_notready">FMOD_ERR_NOTREADY</a> and <code>input</code> is null.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-dspconnection.html#dspconnection_getoutput">DSPConnection::getOutput</a>, <a class="apilink" href="core-api-dsp.html#dsp_addinput">DSP::addInput</a></p>
<h2 api="function" id="dspconnection_getmix"><a href="#dspconnection_getmix">DSPConnection::getMix</a></h2>
<p>Retrieves the connection's volume scale.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">DSPConnection</span><span class="o">::</span><span class="n">getMix</span><span class="p">(</span>
<span class="kt">float</span> <span class="o">*</span><span class="n">volume</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_DSPConnection_GetMix</span><span class="p">(</span>
<span class="n">FMOD_DSPCONNECTION</span> <span class="o">*</span><span class="n">dspconnection</span><span class="p">,</span>
<span class="kt">float</span> <span class="o">*</span><span class="n">volume</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">DSPConnection</span><span class="p">.</span><span class="n">getMix</span><span class="p">(</span>
<span class="k">out</span> <span class="kt">float</span> <span class="n">volume</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">DSPConnection</span><span class="p">.</span><span class="nx">getMix</span><span class="p">(</span>
<span class="nx">volume</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>volume <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>
<p>Volume scale applied to the input before being passed to the output. 0 = silent, 1 = full. Negative level inverts the <a href="glossary.html#signal">signal</a>. Values larger than 1 amplify the signal.</p>
<ul>
<li><span class="label">Units:</span> Linear</li>
<li><span class="label">Range:</span> (-inf, inf)</li>
<li><span class="label">Default:</span> 1</li>
</ul>
</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-dspconnection.html#dspconnection_setmix">DSPConnection::setMix</a></p>
<h2 api="function" id="dspconnection_getmixmatrix"><a href="#dspconnection_getmixmatrix">DSPConnection::getMixMatrix</a></h2>
<p>Retrieves a 2 dimensional pan matrix that maps the <a href="glossary.html#signal">signal</a> from input channels (columns) to output speakers (rows).</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">DSPConnection</span><span class="o">::</span><span class="n">getMixMatrix</span><span class="p">(</span>
<span class="kt">float</span> <span class="o">*</span><span class="n">matrix</span><span class="p">,</span>
<span class="kt">int</span> <span class="o">*</span><span class="n">outchannels</span><span class="p">,</span>
<span class="kt">int</span> <span class="o">*</span><span class="n">inchannels</span><span class="p">,</span>
<span class="kt">int</span> <span class="n">inchannel_hop</span> <span class="o">=</span> <span class="mi">0</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_DSPConnection_GetMixMatrix</span><span class="p">(</span>
<span class="n">FMOD_DSPCONNECTION</span> <span class="o">*</span><span class="n">dspconnection</span><span class="p">,</span>
<span class="kt">float</span> <span class="o">*</span><span class="n">matrix</span><span class="p">,</span>
<span class="kt">int</span> <span class="o">*</span><span class="n">outchannels</span><span class="p">,</span>
<span class="kt">int</span> <span class="o">*</span><span class="n">inchannels</span><span class="p">,</span>
<span class="kt">int</span> <span class="n">inchannel_hop</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">DSPConnection</span><span class="p">.</span><span class="n">getMixMatrix</span><span class="p">(</span>
<span class="kt">float</span><span class="p">[]</span> <span class="n">matrix</span><span class="p">,</span>
<span class="k">out</span> <span class="kt">int</span> <span class="n">outchannels</span><span class="p">,</span>
<span class="k">out</span> <span class="kt">int</span> <span class="n">inchannels</span><span class="p">,</span>
<span class="kt">int</span> <span class="n">inchannel_hop</span> <span class="p">=</span> <span class="m">0</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">DSPConnection</span><span class="p">.</span><span class="nx">getMixMatrix</span><span class="p">(</span>
<span class="nx">matrix</span><span class="p">,</span>
<span class="nx">outchannels</span><span class="p">,</span>
<span class="nx">inchannels</span><span class="p">,</span>
<span class="nx">inchannel_hop</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>matrix <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a><a class="token" href="glossary.html#documentation-conventions" title="Optional">Opt</a></span></dt>
<dd>
<p>Two dimensional array of volume levels in row-major order. Each row represents an output speaker, each column represents an input channel. Passing null or equivalent as the matrix allows querying of <code>outchannels</code> and <code>inchannels</code>.</p>
<ul>
<li><span class="label">Units:</span> Linear</li>
<li><span class="label">Range:</span> (-inf, inf)</li>
</ul>
</dd>
<dt>outchannels <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a><a class="token" href="glossary.html#documentation-conventions" title="Optional">Opt</a></span></dt>
<dd>Number of valid output channels (rows) in <code>matrix</code>. Optional only when <code>matrix</code> is null or equivalent.</dd>
<dt>inchannels <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a><a class="token" href="glossary.html#documentation-conventions" title="Optional">Opt</a></span></dt>
<dd>Number of valid input channels (columns) in <code>matrix</code>. Optional only when <code>matrix</code> is null or equivalent.</dd>
<dt>inchannel_hop <span><a class="token" href="glossary.html#documentation-conventions" title="Optional">Opt</a></span></dt>
<dd>Width (total number of columns) in destination <code>matrix</code>. Can be larger than <code>inchannels</code> to represent a smaller valid region inside a larger matrix.</dd>
</dl>
<p>A matrix element is referenced from the incoming matrix data as <code>outchannel * inchannel_hop + inchannel</code>.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-dspconnection.html#dspconnection_setmixmatrix">DSPConnection::setMixMatrix</a></p>
<h2 api="function" id="dspconnection_getoutput"><a href="#dspconnection_getoutput">DSPConnection::getOutput</a></h2>
<p>Retrieves the connection's output <a href="glossary.html#dsp">DSP unit</a>.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">DSPConnection</span><span class="o">::</span><span class="n">getOutput</span><span class="p">(</span>
<span class="n">DSP</span> <span class="o">**</span><span class="n">output</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_DSPConnection_GetOutput</span><span class="p">(</span>
<span class="n">FMOD_DSPCONNECTION</span> <span class="o">*</span><span class="n">dspconnection</span><span class="p">,</span>
<span class="n">FMOD_DSP</span> <span class="o">**</span><span class="n">output</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">DSPConnection</span><span class="p">.</span><span class="n">getOutput</span><span class="p">(</span>
<span class="k">out</span> <span class="n">DSP</span> <span class="n">output</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">DSPConnection</span><span class="p">.</span><span class="nx">getOutput</span><span class="p">(</span>
<span class="nx">output</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>output <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>Output DSP unit. (<a class="apilink" href="core-api-dsp.html">DSP</a>)</dd>
</dl>
<p>If this function is called very soon after <a class="apilink" href="core-api-dsp.html#dsp_addinput">DSP::addInput</a>, the connection might not be ready because the DSP system is still queued to be connected and may need to wait several milliseconds for the next mix to occur. When this occurs, the function returns <a class="apilink" href="core-api-common.html#fmod_err_notready">FMOD_ERR_NOTREADY</a> and <code>output</code> is null.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-dspconnection.html#dspconnection_getinput">DSPConnection::getInput</a>, <a class="apilink" href="core-api-dsp.html#dsp_addinput">DSP::addInput</a></p>
<h2 api="function" id="dspconnection_gettype"><a href="#dspconnection_gettype">DSPConnection::getType</a></h2>
<p>Retrieves the type of the connection between two <a href="glossary.html#dsp">DSP units</a>.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">DSPConnection</span><span class="o">::</span><span class="n">getType</span><span class="p">(</span>
<span class="n">FMOD_DSPCONNECTION_TYPE</span> <span class="o">*</span><span class="n">type</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_DSPConnection_GetType</span><span class="p">(</span>
<span class="n">FMOD_DSPCONNECTION</span> <span class="o">*</span><span class="n">dspconnection</span><span class="p">,</span>
<span class="n">FMOD_DSPCONNECTION_TYPE</span> <span class="o">*</span><span class="n">type</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">DSPConnection</span><span class="p">.</span><span class="n">getType</span><span class="p">(</span>
<span class="k">out</span> <span class="n">DSPCONNECTION_TYPE</span> <span class="n">type</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">DSPConnection</span><span class="p">.</span><span class="nx">getType</span><span class="p">(</span>
<span class="nx">type</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>type <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>Type of connection. (<a class="apilink" href="core-api-dspconnection.html#fmod_dspconnection_type">FMOD_DSPCONNECTION_TYPE</a>)</dd>
</dl>
<h2 api="function" id="dspconnection_getuserdata"><a href="#dspconnection_getuserdata">DSPConnection::getUserData</a></h2>
<p>Retrieves a user value associated with this object.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">DSPConnection</span><span class="o">::</span><span class="n">getUserData</span><span class="p">(</span>
<span class="kt">void</span> <span class="o">**</span><span class="n">userdata</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_DSPConnection_GetUserData</span><span class="p">(</span>
<span class="n">FMOD_DSPCONNECTION</span> <span class="o">*</span><span class="n">dspconnection</span><span class="p">,</span>
<span class="kt">void</span> <span class="o">**</span><span class="n">userdata</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">DSPConnection</span><span class="p">.</span><span class="n">getUserData</span><span class="p">(</span>
<span class="k">out</span> <span class="n">IntPtr</span> <span class="n">userdata</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">DSPConnection</span><span class="p">.</span><span class="nx">getUserData</span><span class="p">(</span>
<span class="nx">userdata</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>userdata <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>User data set by calling <a class="apilink" href="core-api-dspconnection.html#dspconnection_setuserdata">DSPConnection::setUserData</a>.</dd>
</dl>
<p>This function allows arbitrary user data to be retrieved from this object. See the <a href="glossary.html#user-data">User Data</a> section of the glossary for an example of how to get and set user data.</p>
<h2 api="function" id="dspconnection_setmix"><a href="#dspconnection_setmix">DSPConnection::setMix</a></h2>
<p>Sets the connection's volume scale.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">DSPConnection</span><span class="o">::</span><span class="n">setMix</span><span class="p">(</span>
<span class="kt">float</span> <span class="n">volume</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_DSPConnection_SetMix</span><span class="p">(</span>
<span class="n">FMOD_DSPCONNECTION</span> <span class="o">*</span><span class="n">dspconnection</span><span class="p">,</span>
<span class="kt">float</span> <span class="n">volume</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">DSPConnection</span><span class="p">.</span><span class="n">setMix</span><span class="p">(</span>
<span class="kt">float</span> <span class="n">volume</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">DSPConnection</span><span class="p">.</span><span class="nx">setMix</span><span class="p">(</span>
<span class="nx">volume</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>volume</dt>
<dd>
<p>Volume scale applied to the input before being passed to the output. 0 = silent, 1 = full. Negative level inverts the <a href="glossary.html#signal">signal</a>. Values larger than 1 amplify the signal.</p>
<ul>
<li><span class="label">Units:</span> Linear</li>
<li><span class="label">Range:</span> (-inf, inf)</li>
<li><span class="label">Default:</span> 1</li>
</ul>
</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-dspconnection.html#dspconnection_getmix">DSPConnection::getMix</a>, <a class="apilink" href="core-api-dspconnection.html#dspconnection_setmixmatrix">DSPConnection::setMixMatrix</a>, <a class="apilink" href="core-api-dspconnection.html#dspconnection_getmixmatrix">DSPConnection::getMixMatrix</a></p>
<h2 api="function" id="dspconnection_setmixmatrix"><a href="#dspconnection_setmixmatrix">DSPConnection::setMixMatrix</a></h2>
<p>Sets a 2 dimensional pan matrix that maps the <a href="glossary.html#signal">signal</a> from input channels (columns) to output speakers (rows).</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">DSPConnection</span><span class="o">::</span><span class="n">setMixMatrix</span><span class="p">(</span>
<span class="kt">float</span> <span class="o">*</span><span class="n">matrix</span><span class="p">,</span>
<span class="kt">int</span> <span class="n">outchannels</span><span class="p">,</span>
<span class="kt">int</span> <span class="n">inchannels</span><span class="p">,</span>
<span class="kt">int</span> <span class="n">inchannel_hop</span> <span class="o">=</span> <span class="mi">0</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_DSPConnection_SetMixMatrix</span><span class="p">(</span>
<span class="n">FMOD_DSPCONNECTION</span> <span class="o">*</span><span class="n">dspconnection</span><span class="p">,</span>
<span class="kt">float</span> <span class="o">*</span><span class="n">matrix</span><span class="p">,</span>
<span class="kt">int</span> <span class="n">outchannels</span><span class="p">,</span>
<span class="kt">int</span> <span class="n">inchannels</span><span class="p">,</span>
<span class="kt">int</span> <span class="n">inchannel_hop</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">DSPConnection</span><span class="p">.</span><span class="n">setMixMatrix</span><span class="p">(</span>
<span class="kt">float</span><span class="p">[]</span> <span class="n">matrix</span><span class="p">,</span>
<span class="kt">int</span> <span class="n">outchannels</span><span class="p">,</span>
<span class="kt">int</span> <span class="n">inchannels</span><span class="p">,</span>
<span class="kt">int</span> <span class="n">inchannel_hop</span> <span class="p">=</span> <span class="m">0</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">DSPConnection</span><span class="p">.</span><span class="nx">setMixMatrix</span><span class="p">(</span>
<span class="nx">matrix</span><span class="p">,</span>
<span class="nx">outchannels</span><span class="p">,</span>
<span class="nx">inchannels</span><span class="p">,</span>
<span class="nx">inchannel_hop</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>matrix <span><a class="token" href="glossary.html#documentation-conventions" title="Optional">Opt</a></span></dt>
<dd>
<p>Two dimensional array of volume levels in row-major order. Each row represents an output speaker, each column represents an input channel. Null or equivalent sets a 'default' matrix.</p>
<ul>
<li><span class="label">Units:</span> Linear</li>
<li><span class="label">Range:</span> (-inf, inf)</li>
</ul>
</dd>
<dt>outchannels</dt>
<dd>
<p>Number of output channels (rows) in <code>matrix</code>.</p>
<ul>
<li><span class="label">Range:</span> [0, <a class="apilink" href="core-api-common.html#fmod_max_channel_width">FMOD_MAX_CHANNEL_WIDTH</a>]</li>
</ul>
</dd>
<dt>inchannels</dt>
<dd>
<p>Number of input channels (columns) in <code>matrix</code>.</p>
<ul>
<li><span class="label">Range:</span> [0, <a class="apilink" href="core-api-common.html#fmod_max_channel_width">FMOD_MAX_CHANNEL_WIDTH</a>]</li>
</ul>
</dd>
<dt>inchannel_hop <span><a class="token" href="glossary.html#documentation-conventions" title="Optional">Opt</a></span></dt>
<dd>Width (total number of columns) in source <code>matrix</code>. Can be larger than <code>inchannels</code> to represent a smaller valid region inside a larger matrix.</dd>
</dl>
<ul>
<li>Range: [0, <a class="apilink" href="core-api-common.html#fmod_max_channel_width">FMOD_MAX_CHANNEL_WIDTH</a>]</li>
<li>Default: <code>inchannels</code></li>
</ul>
<p>A matrix element is referenced from the incoming matrix data as <code>outchannel * inchannel_hop + inchannel</code>.</p>
<p>If null or equivalent is passed in via <code>matrix</code> a default upmix, downmix, or unit matrix will take its place. A unit matrix allows a signal to pass through unchanged.</p>
<p>Example 5.1 unit matrix:</p>
<pre><code>1 0 0 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
</code></pre>
<p>Matrix element values can be below 0 to invert a signal and above 1 to amplify the signal. Note that increasing the signal level too far may cause audible distortion.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-dspconnection.html#dspconnection_getmixmatrix">DSPConnection::getMixMatrix</a></p>
<h2 api="function" id="dspconnection_setuserdata"><a href="#dspconnection_setuserdata">DSPConnection::setUserData</a></h2>
<p>Sets a user value associated with this object.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">DSPConnection</span><span class="o">::</span><span class="n">setUserData</span><span class="p">(</span>
<span class="kt">void</span> <span class="o">*</span><span class="n">userdata</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_DSPConnection_SetUserData</span><span class="p">(</span>
<span class="n">FMOD_DSPCONNECTION</span> <span class="o">*</span><span class="n">dspconnection</span><span class="p">,</span>
<span class="kt">void</span> <span class="o">*</span><span class="n">userdata</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">DSPConnection</span><span class="p">.</span><span class="n">setUserData</span><span class="p">(</span>
<span class="n">IntPtr</span> <span class="n">userdata</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">DSPConnection</span><span class="p">.</span><span class="nx">setUserData</span><span class="p">(</span>
<span class="nx">userdata</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>userdata</dt>
<dd>Value stored on this object.</dd>
</dl>
<p>This function allows arbitrary user data to be attached to this object. See the <a href="glossary.html#user-data">User Data</a> section of the glossary for an example of how to get and set user data.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-dspconnection.html#dspconnection_getuserdata">DSPConnection::getUserData</a></p>
<h2 api="enum" id="fmod_dspconnection_type"><a href="#fmod_dspconnection_type">FMOD_DSPCONNECTION_TYPE</a></h2>
<p>List of connection types between two <a href="glossary.html#dsp">DSP units</a>.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-c-cpp"><pre><span></span><span class="k">typedef</span> <span class="k">enum</span> <span class="n">FMOD_DSPCONNECTION_TYPE</span> <span class="p">{</span>
<span class="n">FMOD_DSPCONNECTION_TYPE_STANDARD</span><span class="p">,</span>
<span class="n">FMOD_DSPCONNECTION_TYPE_SIDECHAIN</span><span class="p">,</span>
<span class="n">FMOD_DSPCONNECTION_TYPE_SEND</span><span class="p">,</span>
<span class="n">FMOD_DSPCONNECTION_TYPE_SEND_SIDECHAIN</span><span class="p">,</span>
<span class="n">FMOD_DSPCONNECTION_TYPE_PREALLOCATED</span><span class="p">,</span>
<span class="n">FMOD_DSPCONNECTION_TYPE_MAX</span>
<span class="p">}</span> <span class="n">FMOD_DSPCONNECTION_TYPE</span><span class="p">;</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="k">enum</span> <span class="n">DSPCONNECTION_TYPE</span>
<span class="p">{</span>
<span class="n">STANDARD</span><span class="p">,</span>
<span class="n">SIDECHAIN</span><span class="p">,</span>
<span class="n">SEND</span><span class="p">,</span>
<span class="n">SEND_SIDECHAIN</span><span class="p">,</span>
<span class="n">PREALLOCATED</span><span class="p">,</span>
<span class="n">MAX</span><span class="p">,</span>
<span class="p">}</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">FMOD</span><span class="p">.</span><span class="nx">DSPCONNECTION_TYPE_STANDARD</span>
<span class="nx">FMOD</span><span class="p">.</span><span class="nx">DSPCONNECTION_TYPE_SIDECHAIN</span>
<span class="nx">FMOD</span><span class="p">.</span><span class="nx">DSPCONNECTION_TYPE_SEND</span>
<span class="nx">FMOD</span><span class="p">.</span><span class="nx">DSPCONNECTION_TYPE_SEND_SIDECHAIN</span>
<span class="nx">FMOD</span><span class="p">.</span><span class="nx">DSPCONNECTION_TYPE_PREALLOCATED</span>
<span class="nx">FMOD</span><span class="p">.</span><span class="nx">DSPCONNECTION_TYPE_MAX</span>
</pre></div>
<dl>
<dt id="fmod_dspconnection_type_standard">FMOD_DSPCONNECTION_TYPE_STANDARD</dt>
<dd>Default connection type. Audio is mixed from the input to the output DSP's audible buffer. </dd>
<dt id="fmod_dspconnection_type_sidechain">FMOD_DSPCONNECTION_TYPE_SIDECHAIN</dt>
<dd>Sidechain connection type. Audio is mixed from the input to the output DSP's sidechain buffer.</dd>
<dt id="fmod_dspconnection_type_send">FMOD_DSPCONNECTION_TYPE_SEND</dt>
<dd>Send connection type. Audio is mixed from the input to the output DSP's audible buffer, but the input is not executed, only copied from. A standard connection or sidechain needs to make an input execute to generate data. </dd>
<dt id="fmod_dspconnection_type_send_sidechain">FMOD_DSPCONNECTION_TYPE_SEND_SIDECHAIN</dt>
<dd>Send sidechain connection type. Audio is mixed from the input to the output DSP's sidechain buffer, but the input is not executed, only copied from. A standard connection or sidechain needs to make an input execute to generate data. </dd>
<dt id="fmod_dspconnection_type_preallocated">FMOD_DSPCONNECTION_TYPE_PREALLOCATED</dt>
<dd>Pre-allocated connection allocated with <a class="apilink" href="core-api-system.html#system_createdspconnection">System::createDSPConnection</a>. Only used with <a class="apilink" href="core-api-dsp.html#dsp_addinput">DSP::addInput</a>.</dd>
<dt id="fmod_dspconnection_type_max">FMOD_DSPCONNECTION_TYPE_MAX</dt>
<dd>Maximum number of DSP connection types supported. </dd>
</dl>
<p>FMOD_DSP_CONNECTION_TYPE_STANDARD</p>
<hr />
<p>Default <a class="apilink" href="core-api-dspconnection.html">DSPConnection</a> type. Audio is mixed from the input to the output DSP's audible buffer, meaning it will be part of the audible <a href="glossary.html#signal">signal</a>. A standard connection executes its input DSP if it has not been executed before.</p>
<p>FMOD_DSP_CONNECTION_TYPE_SIDECHAIN</p>
<hr />
<p>Sidechain <a class="apilink" href="core-api-dspconnection.html">DSPConnection</a> type. Audio is mixed from the input to the output DSP's sidechain buffer, meaning it will not be part of the audible signal. A sidechain connection executes its input DSP if it has not been executed before.</p>
<p>This separate sidechain buffer exists so that the DSP can privately access it for analysis purposes. For example, a <a href="effects-reference.html#compressor">compressor DSP</a> could analyze the signal and use the result of that analysis to control its own compression level and gain parameters.</p>
<p>When a sidechain is connected to a DSP, the sidechain buffer is a member of the <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_state">FMOD_DSP_STATE</a> struct, which is itself passed in as a parameter of the read callback. This data simplifies the development of effects that make use of sidechaining.</p>
<p><a class="apilink" href="plugin-api-dsp.html#fmod_dsp_state_sidechaindata">FMOD_DSP_STATE::sidechaindata</a> and <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_state_sidechainchannels">FMOD_DSP_STATE::sidechainchannels</a> will hold the mixed result of any sidechain data flowing into it.</p>
<p>FMOD_DSP_CONNECTION_TYPE_SEND</p>
<hr />
<p>Send <a class="apilink" href="core-api-dspconnection.html">DSPConnection</a> type. Audio is mixed from the input to the output DSP's audible buffer, meaning it becomes part of the audible signal. A send connection will not execute its input <a class="apilink" href="core-api-dsp.html">DSP</a> if it has not been executed before.</p>
<p>A send connection only reads what exists at the input's buffer at the time of executing the output DSP unit (which can be considered the 'return').</p>
<p>FMOD_DSP_CONNECTION_TYPE_SEND_SIDECHAIN</p>
<hr />
<p>Send sidechain <a class="apilink" href="core-api-dspconnection.html">DSPConnection</a> type. Audio is mixed from the input to the output DSP's sidechain buffer, meaning it does not become part of the audible signal. A send sidechain connection does not execute its input DSP if it has not been executed before.</p>
<p>A send sidechain connection only reads what exists at the input's buffer at the time of executing the output DSP unit (which can be considered the 'sidechain return').</p>
<p>When a sidechain is connected to a DSP, the sidechain data is stored in the <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_state">FMOD_DSP_STATE</a> struct that is a function parameter of the read callback. This data simplifies the development of effects that make use of sidechaining.</p>
<p><a class="apilink" href="plugin-api-dsp.html#fmod_dsp_state_sidechaindata">FMOD_DSP_STATE::sidechaindata</a> and <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_state_sidechainchannels">FMOD_DSP_STATE::sidechainchannels</a> hold the mixed result of any sidechain data flowing into them.</p>
<p>FMOD_DSPCONNECTION_TYPE_PREALLOCATED</p>
<hr />
<p>Pre-allocated <a class="apilink" href="core-api-dspconnection.html">DSPConnection</a> type. Used with <a class="apilink" href="core-api-dsp.html#dsp_addinput">DSP::addInput</a> when providing a pre-allocated connection (created by a call to <a class="apilink" href="core-api-system.html#system_createdspconnection">System::createDSPConnection</a>) via the <code>connection</code> parameter.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-dsp.html#dsp_addinput">DSP::addInput</a>, <a class="apilink" href="core-api-dspconnection.html#dspconnection_gettype">DSPConnection::getType</a></p></div>
<p class="manual-footer">FMOD Engine User Manual 2.03.13 (2026-03-31). &copy; 2026 Firelight Technologies Pty Ltd.</p>
</div>
</body>
</html>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,105 @@
<html>
<head>
<title>Core API Reference | Android Specific</title>
<link rel="stylesheet" href="style/docs.css">
<link rel="stylesheet" href="style/code_highlight.css">
<script type="text/javascript" src="scripts/language-selector.js"></script></head>
<body>
<div class="docs-body">
<div class="manual-toc">
<p>FMOD Engine User Manual 2.03</p>
<ul>
<li><a href="welcome.html">Welcome to the FMOD Engine</a></li>
<li><a href="core-api-concepts.html">Core API Key Concepts</a></li>
<li><a href="running-the-core-api.html">Core API Getting Started</a></li>
<li><a href="loading-and-playing-sounds-in-the-core-api.html">Core API Loading and Playing Sounds</a></li>
<li><a href="spatializing-sounds-in-the-core-api.html">Core API Spatializing Sounds</a></li>
<li><a href="mixing-and-routing-in-the-core-api.html">Core API Mixing and Routing</a></li>
<li><a href="using-dsp-effects-in-the-core-api.html">Core API Using DSP Effects</a></li>
<li><a href="effects-reference.html">Core API Effect Reference</a></li>
<li><a href="managing-resources-in-the-core-api.html">Core API Managing Resources</a></li>
<li><a href="advanced-core-api-topics.html">Core API Advanced Topics</a></li>
<li class="manual-current-chapter manual-inactive-chapter"><a href="core-api.html">Core API Reference</a><ul class="subchapters"><li><a href="core-api-common.html">Common</a></li><li><a href="core-api-common-dsp-effects.html">Effect Parameters</a></li><li><a href="core-api-system.html">System</a></li><li><a href="core-api-sound.html">Sound</a></li><li><a href="core-api-channelcontrol.html">ChannelControl</a></li><li><a href="core-api-channel.html">Channel</a></li><li><a href="core-api-channelgroup.html">ChannelGroup</a></li><li><a href="core-api-soundgroup.html">SoundGroup</a></li><li><a href="core-api-dsp.html">DSP</a></li><li><a href="core-api-dspconnection.html">DSPConnection</a></li><li><a href="core-api-geometry.html">Geometry</a></li><li><a href="core-api-reverb3d.html">Reverb3D</a></li><li><a href="core-api-platform-ios.html">iOS Specific</a></li><li class="manual-current-chapter manual-active-chapter"><a href="core-api-platform-android.html">Android Specific</a></li><li><a href="core-api-platform-html5.html">HTML5 Specific</a></li></ul></li>
<li><a href="studio-api-getting-started.html">Studio API Getting Started</a></li>
<li><a href="studio-guide.html">Studio API Guide</a></li>
<li><a href="studio-api-3d-events.html">Studio API 3D Events</a></li>
<li><a href="studio-api-threads.html">Studio API Threads</a></li>
<li><a href="studio-api.html">Studio API Reference</a></li>
<li><a href="platforms.html">Platform Details</a></li>
<li><a href="dsp-plugin-api-guide.html">Plug-in DSP API Guide</a></li>
<li><a href="plugin-api.html">Plug-in API Reference</a></li>
<li><a href="fsbank-api.html">FSBank API Reference</a></li>
<li><a href="troubleshooting.html">Troubleshooting</a></li>
<li><a href="glossary.html">Glossary</a></li>
</ul>
</div>
<div class="manual-content api">
<h1>11. Core API Reference | Android Specific</h1>
<p>APIs and types for Android platform, see fmod_android.h</p>
<ul>
<li><span><a class="apilink" href="core-api-platform-android.html#fmod_android_jni_init" title="Call to initialize FMOD from a native activity.">FMOD_Android_JNI_Init</a> Call to initialize FMOD from a native activity.</span></li>
<li><span><a class="apilink" href="core-api-platform-android.html#fmod_android_jni_close" title="Call to uninitialize FMOD from a native activity.">FMOD_Android_JNI_Close</a> Call to uninitialize FMOD from a native activity.</span></li>
</ul>
<h2 api="function" id="fmod_android_jni_close"><a href="#fmod_android_jni_close">FMOD_Android_JNI_Close</a></h2>
<p>Call to uninitialize FMOD from a native activity.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
</div>
</p>
<div class="highlight language-c-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Android_JNI_Close</span><span class="p">();</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">FMOD</span><span class="p">.</span><span class="n">Android</span><span class="p">.</span><span class="n">JNI_Close</span><span class="p">();</span>
</pre></div>
<div class="admonition language-javascript">
<p>Not supported for JavaScript.</p>
</div>
<p>When using a native activity, you will need to call this function after calling <a class="apilink" href="core-api-system.html#system_release">System::release</a>.</p>
<p><strong>See Also:</strong> <a href="platforms-android.html#java">Java</a></p>
<h2 api="function" id="fmod_android_jni_init"><a href="#fmod_android_jni_init">FMOD_Android_JNI_Init</a></h2>
<p>Call to initialize FMOD from a native activity.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
</div>
</p>
<div class="highlight language-c-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Android_JNI_Init</span><span class="p">(</span>
<span class="n">JavaVM</span> <span class="o">*</span><span class="n">vm</span><span class="p">,</span>
<span class="n">jobject</span> <span class="n">javaActivity</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">FMOD</span><span class="p">.</span><span class="n">Android</span><span class="p">.</span><span class="n">JNI_Init</span><span class="p">(</span>
<span class="n">IntPtr</span> <span class="n">vm</span><span class="p">,</span>
<span class="n">IntPtr</span> <span class="n">javaActivity</span>
<span class="p">);</span>
</pre></div>
<div class="admonition language-javascript">
<p>Not supported for JavaScript.</p>
</div>
<dl>
<dt>vm</dt>
<dd>Pointer to the <code>ANativeActivity::vm</code> JavaVM.</dd>
<dt>javaActivity</dt>
<dd>Pointer to your <code>ANativeActivity::clazz</code> jobject.</dd>
</dl>
<p>When using a native activity, you will need to call this function before making calls into the FMOD API.<br />
The vm must be attached to the current thread before being passed to this function. For example:</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">mApp</span><span class="o">-&gt;</span><span class="n">activity</span><span class="o">-&gt;</span><span class="n">vm</span><span class="o">-&gt;</span><span class="n">AttachCurrentThread</span><span class="p">(</span><span class="o">&amp;</span><span class="n">mJniEnv</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
<span class="n">FMOD_Android_JNI_Init</span><span class="p">(</span><span class="n">mApp</span><span class="o">-&gt;</span><span class="n">activity</span><span class="o">-&gt;</span><span class="n">vm</span><span class="p">,</span> <span class="n">mApp</span><span class="o">-&gt;</span><span class="n">activity</span><span class="o">-&gt;</span><span class="n">clazz</span><span class="p">);</span>
</pre></div>
<p><strong>See Also:</strong> <a href="platforms-android.html#java">Java</a></p></div>
<p class="manual-footer">FMOD Engine User Manual 2.03.13 (2026-03-31). &copy; 2026 Firelight Technologies Pty Ltd.</p>
</div>
</body>
</html>
@@ -0,0 +1,302 @@
<html>
<head>
<title>Core API Reference | HTML5 Specific</title>
<link rel="stylesheet" href="style/docs.css">
<link rel="stylesheet" href="style/code_highlight.css">
<script type="text/javascript" src="scripts/language-selector.js"></script></head>
<body>
<div class="docs-body">
<div class="manual-toc">
<p>FMOD Engine User Manual 2.03</p>
<ul>
<li><a href="welcome.html">Welcome to the FMOD Engine</a></li>
<li><a href="core-api-concepts.html">Core API Key Concepts</a></li>
<li><a href="running-the-core-api.html">Core API Getting Started</a></li>
<li><a href="loading-and-playing-sounds-in-the-core-api.html">Core API Loading and Playing Sounds</a></li>
<li><a href="spatializing-sounds-in-the-core-api.html">Core API Spatializing Sounds</a></li>
<li><a href="mixing-and-routing-in-the-core-api.html">Core API Mixing and Routing</a></li>
<li><a href="using-dsp-effects-in-the-core-api.html">Core API Using DSP Effects</a></li>
<li><a href="effects-reference.html">Core API Effect Reference</a></li>
<li><a href="managing-resources-in-the-core-api.html">Core API Managing Resources</a></li>
<li><a href="advanced-core-api-topics.html">Core API Advanced Topics</a></li>
<li class="manual-current-chapter manual-inactive-chapter"><a href="core-api.html">Core API Reference</a><ul class="subchapters"><li><a href="core-api-common.html">Common</a></li><li><a href="core-api-common-dsp-effects.html">Effect Parameters</a></li><li><a href="core-api-system.html">System</a></li><li><a href="core-api-sound.html">Sound</a></li><li><a href="core-api-channelcontrol.html">ChannelControl</a></li><li><a href="core-api-channel.html">Channel</a></li><li><a href="core-api-channelgroup.html">ChannelGroup</a></li><li><a href="core-api-soundgroup.html">SoundGroup</a></li><li><a href="core-api-dsp.html">DSP</a></li><li><a href="core-api-dspconnection.html">DSPConnection</a></li><li><a href="core-api-geometry.html">Geometry</a></li><li><a href="core-api-reverb3d.html">Reverb3D</a></li><li><a href="core-api-platform-ios.html">iOS Specific</a></li><li><a href="core-api-platform-android.html">Android Specific</a></li><li class="manual-current-chapter manual-active-chapter"><a href="core-api-platform-html5.html">HTML5 Specific</a></li></ul></li>
<li><a href="studio-api-getting-started.html">Studio API Getting Started</a></li>
<li><a href="studio-guide.html">Studio API Guide</a></li>
<li><a href="studio-api-3d-events.html">Studio API 3D Events</a></li>
<li><a href="studio-api-threads.html">Studio API Threads</a></li>
<li><a href="studio-api.html">Studio API Reference</a></li>
<li><a href="platforms.html">Platform Details</a></li>
<li><a href="dsp-plugin-api-guide.html">Plug-in DSP API Guide</a></li>
<li><a href="plugin-api.html">Plug-in API Reference</a></li>
<li><a href="fsbank-api.html">FSBank API Reference</a></li>
<li><a href="troubleshooting.html">Troubleshooting</a></li>
<li><a href="glossary.html">Glossary</a></li>
</ul>
</div>
<div class="manual-content api">
<h1>11. Core API Reference | HTML5 Specific</h1>
<p>APIs and types for HTML5 platform.</p>
<ul>
<li><span><a class="apilink" href="core-api-platform-html5.html#fs_createpreloadedfile" title="Mounts a local file so that FMOD can recognize it when calling a function that uses a filename. Should be called in prerun.">FS_createPreloadedFile</a> Mounts a local file so that FMOD can recognize it when calling a function that uses a filename. Should be called in prerun.</span></li>
<li><span><a class="apilink" href="core-api-platform-html5.html#readfile" title="Read the entire contents of a file into a memory variable, as preloaded by FS_createPreloadedFile.">ReadFile</a> Read the entire contents of a file into a memory variable, as preloaded by <code>FS_createPreloadedFile</code>.</span></li>
<li><span><a class="apilink" href="core-api-platform-html5.html#memory_free" title="Free memory allocated by FMOD internally in ReadFile.">Memory_Free</a> Free memory allocated by FMOD internally in <code>ReadFile</code>.</span></li>
<li><span><a class="apilink" href="core-api-platform-html5.html#file_open" title="Helper function to open a file that was preloaded by FS_createPreloadedFile.">file_open</a> Helper function to open a file that was preloaded by <code>FS_createPreloadedFile</code>.</span></li>
<li><span><a class="apilink" href="core-api-platform-html5.html#file_close" title="Helper function to close a file manually that was preloaded with FS_createPreloadedFile.">file_close</a> Helper function to close a file manually that was preloaded with <code>FS_createPreloadedFile</code>.</span></li>
<li><span><a class="apilink" href="core-api-platform-html5.html#file_read" title="Helper function to read from a file that was preloaded with FS_createPreloadedFile.">file_read</a> Helper function to read from a file that was preloaded with <code>FS_createPreloadedFile</code>.</span></li>
<li><span><a class="apilink" href="core-api-platform-html5.html#file_seek" title="Helper function to seek a file manually that was preloaded with FS_createPreloadedFile.">file_seek</a> Helper function to seek a file manually that was preloaded with <code>FS_createPreloadedFile</code>.</span></li>
<li><span><a class="apilink" href="core-api-platform-html5.html#getvalue" title="Retrieve a value from a specific FMOD memory address.">getValue</a> Retrieve a value from a specific FMOD memory address.</span></li>
<li><span><a class="apilink" href="core-api-platform-html5.html#setvalue" title="Store a value at a specific FMOD memory address.">setValue</a> Store a value at a specific FMOD memory address.</span></li>
</ul>
<h2 api="function" id="fs_createpreloadedfile"><a href="#fs_createpreloadedfile">FS_createPreloadedFile</a></h2>
<p>Mounts a local file so that FMOD can recognize it when calling a function that uses a filename. Should be called in prerun.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-javascript"><pre><span></span><span class="nx">FS_createPreloadedFile</span><span class="p">(</span><span class="nx">ptr</span><span class="p">,</span> <span class="nx">value</span><span class="p">,</span> <span class="nx">type</span><span class="p">);</span>
</pre></div>
<dl>
<dt>parent</dt>
<dd>Parent folder path. (<a href="glossary.html#string-format">UTF-8 string</a>)</dd>
<dt>name</dt>
<dd>The name of the new file. (<a href="glossary.html#string-format">UTF-8 string</a>)</dd>
<dt>url</dt>
<dd>Local (real) file system path the contents will be loaded from (<a href="glossary.html#string-format">UTF-8 string</a>).</dd>
<dt>canRead</dt>
<dd>
<p>Whether the file should have read permissions set from the programs point of view.</p>
<ul>
<li><span class="label">Units:</span> Boolean</li>
</ul>
</dd>
<dt>canWrite</dt>
<dd>
<p>Whether the file should have write permissions set from the programs point of view.</p>
<ul>
<li><span class="label">Units:</span> Boolean</li>
</ul>
</dd>
</dl>
<h4 id="example-usage"><a href="#example-usage">Example usage.</a></h4>
<div class="highlight language-javascript"><pre><span></span><span class="kd">function</span> <span class="nx">prerun</span><span class="p">()</span>
<span class="p">{</span>
<span class="kd">var</span> <span class="nx">fileUrl</span> <span class="o">=</span> <span class="s2">&quot;/public/js/&quot;</span><span class="p">;</span>
<span class="kd">var</span> <span class="nx">fileName</span> <span class="o">=</span> <span class="s2">&quot;Master.Bank&quot;</span><span class="p">;</span>
<span class="kd">var</span> <span class="nx">folderName</span> <span class="o">=</span> <span class="s2">&quot;/&quot;</span><span class="p">;</span>
<span class="nx">FMOD</span><span class="p">.</span><span class="nx">FS_createPreloadedFile</span><span class="p">(</span><span class="nx">folderName</span><span class="p">,</span> <span class="nx">fileName</span><span class="p">,</span> <span class="nx">fileUrl</span> <span class="o">+</span> <span class="nx">fileName</span><span class="p">,</span> <span class="kc">true</span><span class="p">,</span> <span class="kc">false</span><span class="p">);</span>
<span class="p">}</span>
</pre></div>
<p>Wrapper for the <a href="https://emscripten.org/docs/api_reference/Filesystem-API.html#FS.createPreloadedFile">emscripten function</a>.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-platform-html5.html#readfile">ReadFile</a></p>
<h2 api="function" id="readfile"><a href="#readfile">ReadFile</a></h2>
<p>Read the entire contents of a file into a memory variable, as preloaded by <a class="apilink" href="core-api-platform-html5.html#fs_createpreloadedfile">FS_createPreloadedFile</a>.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-javascript"><pre><span></span><span class="nx">ReadFile</span><span class="p">(</span><span class="nx">system</span><span class="p">,</span> <span class="nx">value</span><span class="p">,</span> <span class="nx">type</span><span class="p">);</span>
</pre></div>
<dl>
<dt>system</dt>
<dd><a class="apilink" href="core-api-system.html">System</a> object handle.</dd>
<dt>filename</dt>
<dd>Filename of the file that is to be loaded, that has the path and filename that matches the preloaded path/filename if loaded in that fashion.</dd>
<dt>output <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>Output object containing 'val' and 'length'. Val contains memory that can be passed to FMOD functions like <a class="apilink" href="core-api-system.html#system_createsound">System::createSound</a> (using <a class="apilink" href="core-api-common.html#fmod_openmemory">FMOD_OPENMEMORY</a> ) or <a class="apilink" href="studio-api-system.html#studio_system_loadbankmemory">Studio::System::loadBankMemory</a>.</dd>
</dl>
<h4 id="example-usage_1"><a href="#example-usage_1">Example usage.</a></h4>
<div class="highlight language-javascript"><pre><span></span><span class="nx">result</span> <span class="o">=</span> <span class="nx">FMOD</span><span class="p">.</span><span class="nx">ReadFile</span><span class="p">(</span><span class="nx">gSystemCore</span><span class="p">,</span> <span class="s2">&quot;/&quot;</span> <span class="o">+</span> <span class="nx">filename</span><span class="p">,</span> <span class="nx">outval</span><span class="p">);</span>
<span class="nx">CHECK_RESULT</span><span class="p">(</span><span class="nx">result</span><span class="p">);</span>
<span class="nx">memoryPtr</span> <span class="o">=</span> <span class="nx">outval</span><span class="p">.</span><span class="nx">val</span><span class="p">;</span> <span class="c1">// Pointer to FMOD owned file data. See below where FMOD.Memory_Free is used to free it.</span>
<span class="nx">memoryLength</span> <span class="o">=</span> <span class="nx">outval</span><span class="p">.</span><span class="nx">length</span><span class="p">;</span> <span class="c1">// Length of FMOD owned file data</span>
<span class="nx">result</span> <span class="o">=</span> <span class="nx">gSystem</span><span class="p">.</span><span class="nx">loadBankMemory</span><span class="p">(</span><span class="nx">memoryPtr</span><span class="p">,</span> <span class="nx">memoryLength</span><span class="p">,</span> <span class="nx">FMOD</span><span class="p">.</span><span class="nx">STUDIO_LOAD_MEMORY</span><span class="p">,</span> <span class="nx">FMOD</span><span class="p">.</span><span class="nx">STUDIO_LOAD_BANK_NONBLOCKING</span><span class="p">,</span> <span class="nx">outval</span><span class="p">);</span>
<span class="nx">CHECK_RESULT</span><span class="p">(</span><span class="nx">result</span><span class="p">);</span>
</pre></div>
<p>Call <a class="apilink" href="core-api-platform-html5.html#memory_free">Memory_Free</a> on the variable after using it.</p>
<h2 api="function" id="memory_free"><a href="#memory_free">Memory_Free</a></h2>
<p>Free memory allocated by FMOD internally in <a class="apilink" href="core-api-platform-html5.html#readfile">ReadFile</a>.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-javascript"><pre><span></span><span class="nx">Memory_Free</span><span class="p">(</span><span class="nx">ptr</span><span class="p">);</span>
</pre></div>
<dl>
<dt>ptr</dt>
<dd>Number representing the FMOD buffer address from the ReadFile function.</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-platform-html5.html#readfile">ReadFile</a></p>
<h2 api="function" id="file_open"><a href="#file_open">file_open</a></h2>
<p>Helper function to open a file that was preloaded by <a class="apilink" href="core-api-platform-html5.html#fs_createpreloadedfile">FS_createPreloadedFile</a>.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-javascript"><pre><span></span><span class="nx">file_open</span><span class="p">(</span><span class="nx">system</span><span class="p">,</span> <span class="nx">filename</span><span class="p">,</span> <span class="nx">filesize</span><span class="p">,</span> <span class="nx">handle</span><span class="p">);</span>
</pre></div>
<dl>
<dt>system</dt>
<dd><a class="apilink" href="core-api-system.html">System</a> object handle.</dd>
<dt>filename</dt>
<dd>path and filename which matches the path/filename set up in FMOD.FS_createPreloadedFile. (<a href="glossary.html#string-format">UTF-8 string</a>)</dd>
<dt>filesize <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>An object with the calculated size of the file stored in filesize.val.</dd>
<dt>handle <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>An object with the file handle stored in handle.val.</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-platform-html5.html#file_close">file_close</a>, <a class="apilink" href="core-api-platform-html5.html#file_read">file_read</a>, <a class="apilink" href="core-api-platform-html5.html#file_seek">file_seek</a></p>
<h2 api="function" id="file_close"><a href="#file_close">file_close</a></h2>
<p>Helper function to close a file manually that was preloaded with <a class="apilink" href="core-api-platform-html5.html#fs_createpreloadedfile">FS_createPreloadedFile</a>.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-javascript"><pre><span></span><span class="nx">file_close</span><span class="p">(</span><span class="nx">handle</span><span class="p">);</span>
</pre></div>
<dl>
<dt>handle</dt>
<dd>Handle returned by the <a class="apilink" href="core-api-platform-html5.html#file_open">file_open</a> function.</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-platform-html5.html#file_read">file_read</a>, <a class="apilink" href="core-api-platform-html5.html#file_seek">file_seek</a></p>
<h2 api="function" id="file_read"><a href="#file_read">file_read</a></h2>
<p>Helper function to read from a file that was preloaded with <a class="apilink" href="core-api-platform-html5.html#fs_createpreloadedfile">FS_createPreloadedFile</a>.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-javascript"><pre><span></span><span class="nx">file_read</span><span class="p">(</span><span class="nx">handle</span><span class="p">,</span> <span class="nx">buffer</span><span class="p">,</span> <span class="nx">sizebytes</span><span class="p">,</span> <span class="nx">bytesread</span><span class="p">);</span>
</pre></div>
<dl>
<dt>handle</dt>
<dd>Handle returned by the <a class="apilink" href="core-api-platform-html5.html#file_open">file_open</a> function.</dd>
<dt>buffer</dt>
<dd>A memory address that would come from FMOD, such as that from an FMOD callback or <a class="apilink" href="core-api-sound.html#sound_lock">Sound::lock</a>.</dd>
<dt>sizebytes</dt>
<dd>Integer value with the number of bytes requested to be read from the file handle.</dd>
<dt>bytesread <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>An object with the number of bytes actually read stored in bytesread.val.</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-platform-html5.html#file_open">file_open</a>, <a class="apilink" href="core-api-platform-html5.html#file_close">file_close</a>, <a class="apilink" href="core-api-platform-html5.html#file_seek">file_seek</a></p>
<h2 api="function" id="file_seek"><a href="#file_seek">file_seek</a></h2>
<p>Helper function to seek a file manually that was preloaded with <a class="apilink" href="core-api-platform-html5.html#fs_createpreloadedfile">FS_createPreloadedFile</a>.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-javascript"><pre><span></span><span class="nx">file_seek</span><span class="p">(</span><span class="nx">handle</span><span class="p">,</span> <span class="nx">pos</span><span class="p">);</span>
</pre></div>
<dl>
<dt>handle</dt>
<dd>Handle returned by <a class="apilink" href="core-api-platform-html5.html#file_open">file_open</a> function.</dd>
<dt>pos</dt>
<dd>offset in bytes to seek into the file, relative to the start.</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-platform-html5.html#file_close">file_close</a>, <a class="apilink" href="core-api-platform-html5.html#file_read">file_read</a></p>
<h2 api="function" id="setvalue"><a href="#setvalue">setValue</a></h2>
<p>Store a value at a specific FMOD memory address.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-javascript"><pre><span></span><span class="nx">setValue</span><span class="p">(</span><span class="nx">ptr</span><span class="p">,</span> <span class="nx">value</span><span class="p">,</span> <span class="nx">type</span><span class="p">);</span>
</pre></div>
<dl>
<dt>ptr</dt>
<dd>Number representing the FMOD buffer address.</dd>
<dt>value</dt>
<dd>The value to be stored.</dd>
<dt>type</dt>
<dd>value type specified as a string. ie 'i8', 'i16', 'i32', 'i64', 'float', 'double'. (<a href="glossary.html#string-format">UTF-8 string</a>)</dd>
</dl>
<h4 id="example-usage_2"><a href="#example-usage_2">Example usage.</a></h4>
<div class="highlight language-javascript"><pre><span></span><span class="k">for</span> <span class="p">(</span><span class="kd">var</span> <span class="nx">samp</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="nx">samp</span> <span class="o">&lt;</span> <span class="nx">length</span><span class="p">;</span> <span class="nx">samp</span><span class="o">++</span><span class="p">)</span>
<span class="p">{</span>
<span class="k">for</span> <span class="p">(</span><span class="kd">var</span> <span class="nx">chan</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="nx">chan</span> <span class="o">&lt;</span> <span class="nx">outchannels</span><span class="p">;</span> <span class="nx">chan</span><span class="o">++</span><span class="p">)</span>
<span class="p">{</span>
<span class="c1">// This DSP filter just halves the volume! Input is modified, and sent to output.</span>
<span class="kd">let</span> <span class="nx">val</span> <span class="o">=</span> <span class="nx">FMOD</span><span class="p">.</span><span class="nx">getValue</span><span class="p">(</span><span class="nx">inbuffer</span> <span class="o">+</span> <span class="p">(((</span><span class="nx">samp</span> <span class="o">*</span> <span class="nx">inchannels</span><span class="p">)</span> <span class="o">+</span> <span class="nx">chan</span><span class="p">)</span> <span class="o">*</span> <span class="mi">4</span><span class="p">),</span> <span class="s1">&#39;float&#39;</span><span class="p">)</span> <span class="o">*</span> <span class="nx">dsp_state</span><span class="p">.</span><span class="nx">plugindata</span><span class="p">.</span><span class="nx">volume_linear</span><span class="p">;</span>
<span class="nx">FMOD</span><span class="p">.</span><span class="nx">setValue</span><span class="p">(</span><span class="nx">outbuffer</span> <span class="o">+</span> <span class="p">(((</span><span class="nx">samp</span> <span class="o">*</span> <span class="nx">outchannels</span><span class="p">)</span> <span class="o">+</span> <span class="nx">chan</span><span class="p">)</span> <span class="o">*</span> <span class="mi">4</span><span class="p">),</span> <span class="nx">val</span><span class="p">,</span> <span class="s1">&#39;float&#39;</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
<p>Wrapper for the <a href="https://emscripten.org/docs/api_reference/preamble.js.html#accessing-memory">emscripten function</a>.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-platform-html5.html#getvalue">getValue</a></p>
<h2 api="function" id="getvalue"><a href="#getvalue">getValue</a></h2>
<p>Retrieve a value from a specific FMOD memory address.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-javascript"><pre><span></span><span class="nx">getValue</span><span class="p">(</span><span class="nx">ptr</span><span class="p">,</span> <span class="nx">value</span><span class="p">);</span>
</pre></div>
<dl>
<dt>ptr</dt>
<dd>Number representing the FMOD buffer address.</dd>
<dt>type</dt>
<dd>value type specified as a string. ie 'i8', 'i16', 'i32', 'i64', 'float', 'double'. (<a href="glossary.html#string-format">UTF-8 string</a>)</dd>
</dl>
<h4 id="example-usage_3"><a href="#example-usage_3">Example usage.</a></h4>
<div class="highlight language-javascript"><pre><span></span><span class="k">for</span> <span class="p">(</span><span class="kd">var</span> <span class="nx">samp</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="nx">samp</span> <span class="o">&lt;</span> <span class="nx">length</span><span class="p">;</span> <span class="nx">samp</span><span class="o">++</span><span class="p">)</span>
<span class="p">{</span>
<span class="k">for</span> <span class="p">(</span><span class="kd">var</span> <span class="nx">chan</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="nx">chan</span> <span class="o">&lt;</span> <span class="nx">outchannels</span><span class="p">;</span> <span class="nx">chan</span><span class="o">++</span><span class="p">)</span>
<span class="p">{</span>
<span class="c1">// This DSP filter just halves the volume! Input is modified, and sent to output.</span>
<span class="kd">let</span> <span class="nx">val</span> <span class="o">=</span> <span class="nx">FMOD</span><span class="p">.</span><span class="nx">getValue</span><span class="p">(</span><span class="nx">inbuffer</span> <span class="o">+</span> <span class="p">(((</span><span class="nx">samp</span> <span class="o">*</span> <span class="nx">inchannels</span><span class="p">)</span> <span class="o">+</span> <span class="nx">chan</span><span class="p">)</span> <span class="o">*</span> <span class="mi">4</span><span class="p">),</span> <span class="s1">&#39;float&#39;</span><span class="p">)</span> <span class="o">*</span> <span class="nx">dsp_state</span><span class="p">.</span><span class="nx">plugindata</span><span class="p">.</span><span class="nx">volume_linear</span><span class="p">;</span>
<span class="nx">FMOD</span><span class="p">.</span><span class="nx">setValue</span><span class="p">(</span><span class="nx">outbuffer</span> <span class="o">+</span> <span class="p">(((</span><span class="nx">samp</span> <span class="o">*</span> <span class="nx">outchannels</span><span class="p">)</span> <span class="o">+</span> <span class="nx">chan</span><span class="p">)</span> <span class="o">*</span> <span class="mi">4</span><span class="p">),</span> <span class="nx">val</span><span class="p">,</span> <span class="s1">&#39;float&#39;</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
<p>Wrapper for the <a href="https://emscripten.org/docs/api_reference/preamble.js.html#accessing-memory">emscripten function</a>.</p>
<p><strong>Return value</strong></p>
<p>If this method succeeds, it returns an integer value stored at the specified memory address.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-platform-html5.html#setvalue">setValue</a></p>
<h2 api="function" id="file_seek_1"><a href="#file_seek_1">file_seek</a></h2>
<p>Helper function to seek a file manually that was preloaded with <a class="apilink" href="core-api-platform-html5.html#fs_createpreloadedfile">FS_createPreloadedFile</a>.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-javascript"><pre><span></span><span class="nx">file_seek</span><span class="p">(</span><span class="nx">handle</span><span class="p">,</span> <span class="nx">pos</span><span class="p">);</span>
</pre></div>
<dl>
<dt>handle</dt>
<dd>Handle returned by <a class="apilink" href="core-api-platform-html5.html#file_open">file_open</a> function.</dd>
<dt>pos</dt>
<dd>offset in bytes to seek into the file, relative to the start.</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-platform-html5.html#file_close">file_close</a>, <a class="apilink" href="core-api-platform-html5.html#file_read">file_read</a></p></div>
<p class="manual-footer">FMOD Engine User Manual 2.03.13 (2026-03-31). &copy; 2026 Firelight Technologies Pty Ltd.</p>
</div>
</body>
</html>
@@ -0,0 +1,78 @@
<html>
<head>
<title>Core API Reference | iOS Specific</title>
<link rel="stylesheet" href="style/docs.css">
<link rel="stylesheet" href="style/code_highlight.css">
<script type="text/javascript" src="scripts/language-selector.js"></script></head>
<body>
<div class="docs-body">
<div class="manual-toc">
<p>FMOD Engine User Manual 2.03</p>
<ul>
<li><a href="welcome.html">Welcome to the FMOD Engine</a></li>
<li><a href="core-api-concepts.html">Core API Key Concepts</a></li>
<li><a href="running-the-core-api.html">Core API Getting Started</a></li>
<li><a href="loading-and-playing-sounds-in-the-core-api.html">Core API Loading and Playing Sounds</a></li>
<li><a href="spatializing-sounds-in-the-core-api.html">Core API Spatializing Sounds</a></li>
<li><a href="mixing-and-routing-in-the-core-api.html">Core API Mixing and Routing</a></li>
<li><a href="using-dsp-effects-in-the-core-api.html">Core API Using DSP Effects</a></li>
<li><a href="effects-reference.html">Core API Effect Reference</a></li>
<li><a href="managing-resources-in-the-core-api.html">Core API Managing Resources</a></li>
<li><a href="advanced-core-api-topics.html">Core API Advanced Topics</a></li>
<li class="manual-current-chapter manual-inactive-chapter"><a href="core-api.html">Core API Reference</a><ul class="subchapters"><li><a href="core-api-common.html">Common</a></li><li><a href="core-api-common-dsp-effects.html">Effect Parameters</a></li><li><a href="core-api-system.html">System</a></li><li><a href="core-api-sound.html">Sound</a></li><li><a href="core-api-channelcontrol.html">ChannelControl</a></li><li><a href="core-api-channel.html">Channel</a></li><li><a href="core-api-channelgroup.html">ChannelGroup</a></li><li><a href="core-api-soundgroup.html">SoundGroup</a></li><li><a href="core-api-dsp.html">DSP</a></li><li><a href="core-api-dspconnection.html">DSPConnection</a></li><li><a href="core-api-geometry.html">Geometry</a></li><li><a href="core-api-reverb3d.html">Reverb3D</a></li><li class="manual-current-chapter manual-active-chapter"><a href="core-api-platform-ios.html">iOS Specific</a></li><li><a href="core-api-platform-android.html">Android Specific</a></li><li><a href="core-api-platform-html5.html">HTML5 Specific</a></li></ul></li>
<li><a href="studio-api-getting-started.html">Studio API Getting Started</a></li>
<li><a href="studio-guide.html">Studio API Guide</a></li>
<li><a href="studio-api-3d-events.html">Studio API 3D Events</a></li>
<li><a href="studio-api-threads.html">Studio API Threads</a></li>
<li><a href="studio-api.html">Studio API Reference</a></li>
<li><a href="platforms.html">Platform Details</a></li>
<li><a href="dsp-plugin-api-guide.html">Plug-in DSP API Guide</a></li>
<li><a href="plugin-api.html">Plug-in API Reference</a></li>
<li><a href="fsbank-api.html">FSBank API Reference</a></li>
<li><a href="troubleshooting.html">Troubleshooting</a></li>
<li><a href="glossary.html">Glossary</a></li>
</ul>
</div>
<div class="manual-content api">
<h1>11. Core API Reference | iOS Specific</h1>
<p>APIs and types for iOS platform, see fmod_ios.h</p>
<ul>
<li><span><a class="apilink" href="core-api-platform-ios.html#fmod_audioqueue_codecpolicy" title="Control whether the sound will use a the dedicated hardware decoder or a software codec.">FMOD_AUDIOQUEUE_CODECPOLICY</a> Control whether the sound will use a the dedicated hardware decoder or a software codec.</span></li>
</ul>
<h2 api="enum" id="fmod_audioqueue_codecpolicy"><a href="#fmod_audioqueue_codecpolicy">FMOD_AUDIOQUEUE_CODECPOLICY</a></h2>
<p>Control whether the sound will use a the dedicated hardware decoder or a software codec.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
</div>
</p>
<div class="highlight language-c-cpp"><pre><span></span><span class="k">typedef</span> <span class="k">enum</span> <span class="n">FMOD_AUDIOQUEUE_CODECPOLICY</span> <span class="p">{</span>
<span class="n">FMOD_AUDIOQUEUE_CODECPOLICY_DEFAULT</span><span class="p">,</span>
<span class="n">FMOD_AUDIOQUEUE_CODECPOLICY_SOFTWAREONLY</span><span class="p">,</span>
<span class="n">FMOD_AUDIOQUEUE_CODECPOLICY_HARDWAREONLY</span>
<span class="p">}</span> <span class="n">FMOD_AUDIOQUEUE_CODECPOLICY</span><span class="p">;</span>
</pre></div>
<div class="admonition language-csharp">
<p>Not supported for C#.</p>
</div>
<div class="admonition language-javascript">
<p>Not supported for JavaScript.</p>
</div>
<dl>
<dt id="fmod_audioqueue_codecpolicy_default">FMOD_AUDIOQUEUE_CODECPOLICY_DEFAULT</dt>
<dd>Try hardware first, if it's in use or prohibited by audio session, try software.</dd>
<dt id="fmod_audioqueue_codecpolicy_softwareonly">FMOD_AUDIOQUEUE_CODECPOLICY_SOFTWAREONLY</dt>
<dd>kAudioQueueHardwareCodecPolicy_UseSoftwareOnly ~ try software, if not available fail.</dd>
<dt id="fmod_audioqueue_codecpolicy_hardwareonly">FMOD_AUDIOQUEUE_CODECPOLICY_HARDWAREONLY</dt>
<dd>kAudioQueueHardwareCodecPolicy_UseHardwareOnly ~ try hardware, if not available fail.</dd>
</dl>
<p>Every devices has a single hardware decoder and unlimited software decoders.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-system.html#fmod_createsoundexinfo">FMOD_CREATESOUNDEXINFO</a></p></div>
<p class="manual-footer">FMOD Engine User Manual 2.03.13 (2026-03-31). &copy; 2026 Firelight Technologies Pty Ltd.</p>
</div>
</body>
</html>
@@ -0,0 +1,432 @@
<html>
<head>
<title>Core API Reference | Reverb3D</title>
<link rel="stylesheet" href="style/docs.css">
<link rel="stylesheet" href="style/code_highlight.css">
<script type="text/javascript" src="scripts/language-selector.js"></script></head>
<body>
<div class="docs-body">
<div class="manual-toc">
<p>FMOD Engine User Manual 2.03</p>
<ul>
<li><a href="welcome.html">Welcome to the FMOD Engine</a></li>
<li><a href="core-api-concepts.html">Core API Key Concepts</a></li>
<li><a href="running-the-core-api.html">Core API Getting Started</a></li>
<li><a href="loading-and-playing-sounds-in-the-core-api.html">Core API Loading and Playing Sounds</a></li>
<li><a href="spatializing-sounds-in-the-core-api.html">Core API Spatializing Sounds</a></li>
<li><a href="mixing-and-routing-in-the-core-api.html">Core API Mixing and Routing</a></li>
<li><a href="using-dsp-effects-in-the-core-api.html">Core API Using DSP Effects</a></li>
<li><a href="effects-reference.html">Core API Effect Reference</a></li>
<li><a href="managing-resources-in-the-core-api.html">Core API Managing Resources</a></li>
<li><a href="advanced-core-api-topics.html">Core API Advanced Topics</a></li>
<li class="manual-current-chapter manual-inactive-chapter"><a href="core-api.html">Core API Reference</a><ul class="subchapters"><li><a href="core-api-common.html">Common</a></li><li><a href="core-api-common-dsp-effects.html">Effect Parameters</a></li><li><a href="core-api-system.html">System</a></li><li><a href="core-api-sound.html">Sound</a></li><li><a href="core-api-channelcontrol.html">ChannelControl</a></li><li><a href="core-api-channel.html">Channel</a></li><li><a href="core-api-channelgroup.html">ChannelGroup</a></li><li><a href="core-api-soundgroup.html">SoundGroup</a></li><li><a href="core-api-dsp.html">DSP</a></li><li><a href="core-api-dspconnection.html">DSPConnection</a></li><li><a href="core-api-geometry.html">Geometry</a></li><li class="manual-current-chapter manual-active-chapter"><a href="core-api-reverb3d.html">Reverb3D</a></li><li><a href="core-api-platform-ios.html">iOS Specific</a></li><li><a href="core-api-platform-android.html">Android Specific</a></li><li><a href="core-api-platform-html5.html">HTML5 Specific</a></li></ul></li>
<li><a href="studio-api-getting-started.html">Studio API Getting Started</a></li>
<li><a href="studio-guide.html">Studio API Guide</a></li>
<li><a href="studio-api-3d-events.html">Studio API 3D Events</a></li>
<li><a href="studio-api-threads.html">Studio API Threads</a></li>
<li><a href="studio-api.html">Studio API Reference</a></li>
<li><a href="platforms.html">Platform Details</a></li>
<li><a href="dsp-plugin-api-guide.html">Plug-in DSP API Guide</a></li>
<li><a href="plugin-api.html">Plug-in API Reference</a></li>
<li><a href="fsbank-api.html">FSBank API Reference</a></li>
<li><a href="troubleshooting.html">Troubleshooting</a></li>
<li><a href="glossary.html">Glossary</a></li>
</ul>
</div>
<div class="manual-content api">
<h1>11. Core API Reference | Reverb3D</h1>
<p>An interface that manages virtual 3D reverb spheres. For more information, see the <a href="advanced-core-api-topics.html#3d-reverbs">3D Reverbs</a> section of the <a href="advanced-core-api-topics.html">Advanced Core API Topics</a> chapter.</p>
<p><strong>General:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-reverb3d.html#reverb3d_set3dattributes" title="Sets the 3D attributes of a reverb sphere.">Reverb3D::set3DAttributes</a> Sets the 3D attributes of a reverb sphere.</span></li>
<li><span><a class="apilink" href="core-api-reverb3d.html#reverb3d_get3dattributes" title="Retrieves the 3D attributes of a reverb sphere.">Reverb3D::get3DAttributes</a> Retrieves the 3D attributes of a reverb sphere.</span></li>
<li><span><a class="apilink" href="core-api-reverb3d.html#reverb3d_setproperties" title="Sets the environmental properties of a reverb sphere.">Reverb3D::setProperties</a> Sets the environmental properties of a reverb sphere.</span></li>
<li><span><a class="apilink" href="core-api-reverb3d.html#reverb3d_getproperties" title="Retrieves the environmental properties of a reverb sphere.">Reverb3D::getProperties</a> Retrieves the environmental properties of a reverb sphere.</span></li>
<li><span><a class="apilink" href="core-api-reverb3d.html#reverb3d_setactive" title="Sets the active state.">Reverb3D::setActive</a> Sets the active state.</span></li>
<li><span><a class="apilink" href="core-api-reverb3d.html#reverb3d_getactive" title="Retrieves the active state.">Reverb3D::getActive</a> Retrieves the active state.</span></li>
<li><span><a class="apilink" href="core-api-reverb3d.html#reverb3d_setuserdata" title="Sets a user value associated with this object.">Reverb3D::setUserData</a> Sets a user value associated with this object.</span></li>
<li><span><a class="apilink" href="core-api-reverb3d.html#reverb3d_getuserdata" title="Retrieves a user value associated with this object.">Reverb3D::getUserData</a> Retrieves a user value associated with this object.</span></li>
<li><span><a class="apilink" href="core-api-reverb3d.html#reverb3d_release" title="Releases the memory for a reverb object and makes it inactive.">Reverb3D::release</a> Releases the memory for a reverb object and makes it inactive.</span></li>
</ul>
<h2 api="function" id="reverb3d_get3dattributes"><a href="#reverb3d_get3dattributes">Reverb3D::get3DAttributes</a></h2>
<p>Retrieves the 3D attributes of a reverb sphere.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">Reverb3D</span><span class="o">::</span><span class="n">get3DAttributes</span><span class="p">(</span>
<span class="n">FMOD_VECTOR</span> <span class="o">*</span><span class="n">position</span><span class="p">,</span>
<span class="kt">float</span> <span class="o">*</span><span class="n">mindistance</span><span class="p">,</span>
<span class="kt">float</span> <span class="o">*</span><span class="n">maxdistance</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Reverb3D_Get3DAttributes</span><span class="p">(</span>
<span class="n">FMOD_REVERB3D</span> <span class="o">*</span><span class="n">reverb3d</span><span class="p">,</span>
<span class="n">FMOD_VECTOR</span> <span class="o">*</span><span class="n">position</span><span class="p">,</span>
<span class="kt">float</span> <span class="o">*</span><span class="n">mindistance</span><span class="p">,</span>
<span class="kt">float</span> <span class="o">*</span><span class="n">maxdistance</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">Reverb3D</span><span class="p">.</span><span class="n">get3DAttributes</span><span class="p">(</span>
<span class="k">ref</span> <span class="n">VECTOR</span> <span class="n">position</span><span class="p">,</span>
<span class="k">ref</span> <span class="kt">float</span> <span class="n">mindistance</span><span class="p">,</span>
<span class="k">ref</span> <span class="kt">float</span> <span class="n">maxdistance</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">Reverb3D</span><span class="p">.</span><span class="nx">get3DAttributes</span><span class="p">(</span>
<span class="nx">position</span><span class="p">,</span>
<span class="nx">mindistance</span><span class="p">,</span>
<span class="nx">maxdistance</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>position <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a><a class="token" href="glossary.html#documentation-conventions" title="Optional">Opt</a></span></dt>
<dd>Position in 3D space represnting the center of the reverb. (<a class="apilink" href="core-api-common.html#fmod_vector">FMOD_VECTOR</a>)</dd>
<dt>mindistance <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a><a class="token" href="glossary.html#documentation-conventions" title="Optional">Opt</a></span></dt>
<dd>Distance from the centerpoint within which the reverb will have full effect.</dd>
<dt>maxdistance <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a><a class="token" href="glossary.html#documentation-conventions" title="Optional">Opt</a></span></dt>
<dd>Distance from the centerpoint beyond which the reverb will have no effect.</dd>
</dl>
<p>For more information, see the <a href="advanced-core-api-topics.html#3d-reverbs">3D Reverbs</a> section of the <a href="advanced-core-api-topics.html">Advanced Core API Topics</a> chapter.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-reverb3d.html#reverb3d_set3dattributes">Reverb3D::set3DAttributes</a></p>
<h2 api="function" id="reverb3d_getactive"><a href="#reverb3d_getactive">Reverb3D::getActive</a></h2>
<p>Retrieves the active state.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">Reverb3D</span><span class="o">::</span><span class="n">getActive</span><span class="p">(</span>
<span class="kt">bool</span> <span class="o">*</span><span class="n">active</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Reverb3D_GetActive</span><span class="p">(</span>
<span class="n">FMOD_REVERB3D</span> <span class="o">*</span><span class="n">reverb3d</span><span class="p">,</span>
<span class="n">FMOD_BOOL</span> <span class="o">*</span><span class="n">active</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">Reverb3D</span><span class="p">.</span><span class="n">getActive</span><span class="p">(</span>
<span class="k">out</span> <span class="kt">bool</span> <span class="n">active</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">Reverb3D</span><span class="p">.</span><span class="nx">getActive</span><span class="p">(</span>
<span class="nx">active</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>active <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>
<p>Active state of the reverb sphere.</p>
<ul>
<li><span class="label">Units:</span> Boolean</li>
<li><span class="label">Default:</span> True</li>
</ul>
</dd>
</dl>
<p>For more information, see the <a href="advanced-core-api-topics.html#3d-reverbs">3D Reverbs</a> section of the <a href="advanced-core-api-topics.html">Advanced Core API Topics</a> chapter.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-reverb3d.html#reverb3d_setactive">Reverb3D::setActive</a></p>
<h2 api="function" id="reverb3d_getproperties"><a href="#reverb3d_getproperties">Reverb3D::getProperties</a></h2>
<p>Retrieves the environmental properties of a reverb sphere.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">Reverb3D</span><span class="o">::</span><span class="n">getProperties</span><span class="p">(</span>
<span class="n">FMOD_REVERB_PROPERTIES</span> <span class="o">*</span><span class="n">properties</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Reverb3D_GetProperties</span><span class="p">(</span>
<span class="n">FMOD_REVERB3D</span> <span class="o">*</span><span class="n">reverb3d</span><span class="p">,</span>
<span class="n">FMOD_REVERB_PROPERTIES</span> <span class="o">*</span><span class="n">properties</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">Reverb3D</span><span class="p">.</span><span class="n">getProperties</span><span class="p">(</span>
<span class="k">ref</span> <span class="n">REVERB_PROPERTIES</span> <span class="n">properties</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">Reverb3D</span><span class="p">.</span><span class="nx">getProperties</span><span class="p">(</span>
<span class="nx">properties</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>properties <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>Reverb properties. (<a class="apilink" href="core-api-system.html#fmod_reverb_properties">FMOD_REVERB_PROPERTIES</a>)</dd>
</dl>
<p>For more information, see the <a href="advanced-core-api-topics.html#3d-reverbs">3D Reverbs</a> section of the <a href="advanced-core-api-topics.html">Advanced Core API Topics</a> chapter.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-reverb3d.html#reverb3d_setproperties">Reverb3D::setProperties</a></p>
<h2 api="function" id="reverb3d_getuserdata"><a href="#reverb3d_getuserdata">Reverb3D::getUserData</a></h2>
<p>Retrieves a user value associated with this object.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">Reverb3D</span><span class="o">::</span><span class="n">getUserData</span><span class="p">(</span>
<span class="kt">void</span> <span class="o">**</span><span class="n">userdata</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Reverb3D_GetUserData</span><span class="p">(</span>
<span class="n">FMOD_REVERB3D</span> <span class="o">*</span><span class="n">reverb3d</span><span class="p">,</span>
<span class="kt">void</span> <span class="o">**</span><span class="n">userdata</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">Reverb3D</span><span class="p">.</span><span class="n">getUserData</span><span class="p">(</span>
<span class="k">out</span> <span class="n">IntPtr</span> <span class="n">userdata</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">Reverb3D</span><span class="p">.</span><span class="nx">getUserData</span><span class="p">(</span>
<span class="nx">userdata</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>userdata <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>User data set by calling <a class="apilink" href="core-api-reverb3d.html#reverb3d_setuserdata">Reverb3D::setUserData</a>.</dd>
</dl>
<p>This function allows arbitrary user data to be retrieved from this object. See the <a href="glossary.html#user-data">User Data</a> section of the glossary for an example of how to get and set user data.</p>
<p><strong>See Also:</strong> <a href="advanced-core-api-topics.html#3d-reverbs">3D Reverbs</a>.</p>
<h2 api="function" id="reverb3d_release"><a href="#reverb3d_release">Reverb3D::release</a></h2>
<p>Releases the memory for a reverb object and makes it inactive.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">Reverb3D</span><span class="o">::</span><span class="n">release</span><span class="p">();</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Reverb3D_Release</span><span class="p">(</span><span class="n">FMOD_REVERB3D</span> <span class="o">*</span><span class="n">reverb3d</span><span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">Reverb3D</span><span class="p">.</span><span class="n">release</span><span class="p">();</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">Reverb3D</span><span class="p">.</span><span class="nx">release</span><span class="p">();</span>
</pre></div>
<p>If you release all Reverb3D objects and have not added a new Reverb3D object, <a class="apilink" href="core-api-system.html#system_setreverbproperties">System::setReverbProperties</a> should be called to reset the reverb properties.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-system.html#system_createreverb3d">System::createReverb3D</a></p>
<h2 api="function" id="reverb3d_set3dattributes"><a href="#reverb3d_set3dattributes">Reverb3D::set3DAttributes</a></h2>
<p>Sets the 3D attributes of a reverb sphere.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">Reverb3D</span><span class="o">::</span><span class="n">set3DAttributes</span><span class="p">(</span>
<span class="k">const</span> <span class="n">FMOD_VECTOR</span> <span class="o">*</span><span class="n">position</span><span class="p">,</span>
<span class="kt">float</span> <span class="n">mindistance</span><span class="p">,</span>
<span class="kt">float</span> <span class="n">maxdistance</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Reverb3D_Set3DAttributes</span><span class="p">(</span>
<span class="n">FMOD_REVERB3D</span> <span class="o">*</span><span class="n">reverb3d</span><span class="p">,</span>
<span class="k">const</span> <span class="n">FMOD_VECTOR</span> <span class="o">*</span><span class="n">position</span><span class="p">,</span>
<span class="kt">float</span> <span class="n">mindistance</span><span class="p">,</span>
<span class="kt">float</span> <span class="n">maxdistance</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">Reverb3D</span><span class="p">.</span><span class="n">set3DAttributes</span><span class="p">(</span>
<span class="k">ref</span> <span class="n">VECTOR</span> <span class="n">position</span><span class="p">,</span>
<span class="kt">float</span> <span class="n">mindistance</span><span class="p">,</span>
<span class="kt">float</span> <span class="n">maxdistance</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">Reverb3D</span><span class="p">.</span><span class="nx">set3DAttributes</span><span class="p">(</span>
<span class="nx">position</span><span class="p">,</span>
<span class="nx">mindistance</span><span class="p">,</span>
<span class="nx">maxdistance</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>position <span><a class="token" href="glossary.html#documentation-conventions" title="Optional">Opt</a></span></dt>
<dd>
<p>Position in 3D space represnting the center of the reverb. (<a class="apilink" href="core-api-common.html#fmod_vector">FMOD_VECTOR</a>)</p>
<ul>
<li><span class="label">Units:</span> <a href="glossary.html#distance-units">Distance units</a></li>
<li><span class="label">Default:</span> (0, 0, 0)</li>
</ul>
</dd>
<dt>mindistance</dt>
<dd>
<p>Distance from the centerpoint within which the reverb will have full effect.</p>
<ul>
<li><span class="label">Units:</span> <a href="glossary.html#distance-units">Distance units</a></li>
<li><span class="label">Default:</span> 0</li>
</ul>
</dd>
<dt>maxdistance</dt>
<dd>
<p>Distance from the centerpoint beyond which the reverb will have no effect.</p>
<ul>
<li><span class="label">Units:</span> <a href="glossary.html#distance-units">Distance units</a></li>
<li><span class="label">Default:</span> 0</li>
</ul>
</dd>
</dl>
<p>For more information, see the <a href="advanced-core-api-topics.html#3d-reverbs">3D Reverbs</a> section of the <a href="advanced-core-api-topics.html">Advanced Core API Topics</a> chapter.</p>
<p>When the position of the listener is less than maxdistance away from the position of one or more reverb objects, the listener's 3D reverb properties are a weighted combination of those reverb objects. Otherwise, the <a href="effects-reference.html#sfx-reverb">reverb DSP</a> will use the global reverb settings.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-reverb3d.html#reverb3d_get3dattributes">Reverb3D::get3DAttributes</a></p>
<h2 api="function" id="reverb3d_setactive"><a href="#reverb3d_setactive">Reverb3D::setActive</a></h2>
<p>Sets the active state.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">Reverb3D</span><span class="o">::</span><span class="n">setActive</span><span class="p">(</span>
<span class="kt">bool</span> <span class="n">active</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Reverb3D_SetActive</span><span class="p">(</span>
<span class="n">FMOD_REVERB3D</span> <span class="o">*</span><span class="n">reverb3d</span><span class="p">,</span>
<span class="n">FMOD_BOOL</span> <span class="n">active</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">Reverb3D</span><span class="p">.</span><span class="n">setActive</span><span class="p">(</span>
<span class="kt">bool</span> <span class="n">active</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">Reverb3D</span><span class="p">.</span><span class="nx">setActive</span><span class="p">(</span>
<span class="nx">active</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>active</dt>
<dd>
<p>Active state of the reverb sphere.</p>
<ul>
<li><span class="label">Units:</span> Boolean</li>
<li><span class="label">Default:</span> True</li>
</ul>
</dd>
</dl>
<p>For more information, see the <a href="advanced-core-api-topics.html#3d-reverbs">3D Reverbs</a> section of the <a href="advanced-core-api-topics.html">Advanced Core API Topics</a> chapter.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-reverb3d.html#reverb3d_getactive">Reverb3D::getActive</a></p>
<h2 api="function" id="reverb3d_setproperties"><a href="#reverb3d_setproperties">Reverb3D::setProperties</a></h2>
<p>Sets the environmental properties of a reverb sphere.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">Reverb3D</span><span class="o">::</span><span class="n">setProperties</span><span class="p">(</span>
<span class="k">const</span> <span class="n">FMOD_REVERB_PROPERTIES</span> <span class="o">*</span><span class="n">properties</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Reverb3D_SetProperties</span><span class="p">(</span>
<span class="n">FMOD_REVERB3D</span> <span class="o">*</span><span class="n">reverb3d</span><span class="p">,</span>
<span class="k">const</span> <span class="n">FMOD_REVERB_PROPERTIES</span> <span class="o">*</span><span class="n">properties</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">Reverb3D</span><span class="p">.</span><span class="n">setProperties</span><span class="p">(</span>
<span class="k">ref</span> <span class="n">REVERB_PROPERTIES</span> <span class="n">properties</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">Reverb3D</span><span class="p">.</span><span class="nx">setProperties</span><span class="p">(</span>
<span class="nx">properties</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>properties</dt>
<dd>Reverb properties. (<a class="apilink" href="core-api-system.html#fmod_reverb_properties">FMOD_REVERB_PROPERTIES</a>)</dd>
</dl>
<p>Fore more information, see the <a href="advanced-core-api-topics.html#3d-reverbs">3D Reverbs</a> section of the <a href="advanced-core-api-topics.html">Advanced Core API Topics</a> chapter.</p>
<p>Reverb presets are available, see <a class="apilink" href="core-api-system.html#fmod_reverb_presets">FMOD_REVERB_PRESETS</a>.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-reverb3d.html#reverb3d_getproperties">Reverb3D::getProperties</a></p>
<h2 api="function" id="reverb3d_setuserdata"><a href="#reverb3d_setuserdata">Reverb3D::setUserData</a></h2>
<p>Sets a user value associated with this object.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">Reverb3D</span><span class="o">::</span><span class="n">setUserData</span><span class="p">(</span>
<span class="kt">void</span> <span class="o">*</span><span class="n">userdata</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_Reverb3D_SetUserData</span><span class="p">(</span>
<span class="n">FMOD_REVERB3D</span> <span class="o">*</span><span class="n">reverb3d</span><span class="p">,</span>
<span class="kt">void</span> <span class="o">*</span><span class="n">userdata</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">Reverb3D</span><span class="p">.</span><span class="n">setUserData</span><span class="p">(</span>
<span class="n">IntPtr</span> <span class="n">userdata</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">Reverb3D</span><span class="p">.</span><span class="nx">setUserData</span><span class="p">(</span>
<span class="nx">userdata</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>userdata</dt>
<dd>Value stored on this object.</dd>
</dl>
<p>This function allows arbitrary user data to be attached to this object. See the <a href="glossary.html#user-data">User Data</a> section of the glossary for an example of how to get and set user data.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-reverb3d.html#reverb3d_getuserdata">Reverb3D::getUserData</a></p></div>
<p class="manual-footer">FMOD Engine User Manual 2.03.13 (2026-03-31). &copy; 2026 Firelight Technologies Pty Ltd.</p>
</div>
</body>
</html>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,784 @@
<html>
<head>
<title>Core API Reference | SoundGroup</title>
<link rel="stylesheet" href="style/docs.css">
<link rel="stylesheet" href="style/code_highlight.css">
<script type="text/javascript" src="scripts/language-selector.js"></script></head>
<body>
<div class="docs-body">
<div class="manual-toc">
<p>FMOD Engine User Manual 2.03</p>
<ul>
<li><a href="welcome.html">Welcome to the FMOD Engine</a></li>
<li><a href="core-api-concepts.html">Core API Key Concepts</a></li>
<li><a href="running-the-core-api.html">Core API Getting Started</a></li>
<li><a href="loading-and-playing-sounds-in-the-core-api.html">Core API Loading and Playing Sounds</a></li>
<li><a href="spatializing-sounds-in-the-core-api.html">Core API Spatializing Sounds</a></li>
<li><a href="mixing-and-routing-in-the-core-api.html">Core API Mixing and Routing</a></li>
<li><a href="using-dsp-effects-in-the-core-api.html">Core API Using DSP Effects</a></li>
<li><a href="effects-reference.html">Core API Effect Reference</a></li>
<li><a href="managing-resources-in-the-core-api.html">Core API Managing Resources</a></li>
<li><a href="advanced-core-api-topics.html">Core API Advanced Topics</a></li>
<li class="manual-current-chapter manual-inactive-chapter"><a href="core-api.html">Core API Reference</a><ul class="subchapters"><li><a href="core-api-common.html">Common</a></li><li><a href="core-api-common-dsp-effects.html">Effect Parameters</a></li><li><a href="core-api-system.html">System</a></li><li><a href="core-api-sound.html">Sound</a></li><li><a href="core-api-channelcontrol.html">ChannelControl</a></li><li><a href="core-api-channel.html">Channel</a></li><li><a href="core-api-channelgroup.html">ChannelGroup</a></li><li class="manual-current-chapter manual-active-chapter"><a href="core-api-soundgroup.html">SoundGroup</a></li><li><a href="core-api-dsp.html">DSP</a></li><li><a href="core-api-dspconnection.html">DSPConnection</a></li><li><a href="core-api-geometry.html">Geometry</a></li><li><a href="core-api-reverb3d.html">Reverb3D</a></li><li><a href="core-api-platform-ios.html">iOS Specific</a></li><li><a href="core-api-platform-android.html">Android Specific</a></li><li><a href="core-api-platform-html5.html">HTML5 Specific</a></li></ul></li>
<li><a href="studio-api-getting-started.html">Studio API Getting Started</a></li>
<li><a href="studio-guide.html">Studio API Guide</a></li>
<li><a href="studio-api-3d-events.html">Studio API 3D Events</a></li>
<li><a href="studio-api-threads.html">Studio API Threads</a></li>
<li><a href="studio-api.html">Studio API Reference</a></li>
<li><a href="platforms.html">Platform Details</a></li>
<li><a href="dsp-plugin-api-guide.html">Plug-in DSP API Guide</a></li>
<li><a href="plugin-api.html">Plug-in API Reference</a></li>
<li><a href="fsbank-api.html">FSBank API Reference</a></li>
<li><a href="troubleshooting.html">Troubleshooting</a></li>
<li><a href="glossary.html">Glossary</a></li>
</ul>
</div>
<div class="manual-content api">
<h1>11. Core API Reference | SoundGroup</h1>
<p>An interface that manages Sound Groups</p>
<p><strong>Group Functions:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-soundgroup.html#soundgroup_setmaxaudible" title="Sets the maximum number of playbacks to be audible at once in a sound group.">SoundGroup::setMaxAudible</a> Sets the maximum number of playbacks to be audible at once in a sound group.</span></li>
<li><span><a class="apilink" href="core-api-soundgroup.html#soundgroup_getmaxaudible" title="Retrieves the maximum number of playbacks to be audible at once in a sound group.">SoundGroup::getMaxAudible</a> Retrieves the maximum number of playbacks to be audible at once in a sound group.</span></li>
<li><span><a class="apilink" href="core-api-soundgroup.html#soundgroup_setmaxaudiblebehavior" title="This function changes the way the sound playback behaves when too many sounds are playing in a soundgroup.">SoundGroup::setMaxAudibleBehavior</a> This function changes the way the sound playback behaves when too many sounds are playing in a soundgroup.</span></li>
<li><span><a class="apilink" href="core-api-soundgroup.html#soundgroup_getmaxaudiblebehavior" title="Retrieves the current max audible behavior.">SoundGroup::getMaxAudibleBehavior</a> Retrieves the current max audible behavior.</span></li>
<li><span><a class="apilink" href="core-api-soundgroup.html#soundgroup_setmutefadespeed" title="Sets a mute fade time.">SoundGroup::setMuteFadeSpeed</a> Sets a mute fade time.</span></li>
<li><span><a class="apilink" href="core-api-soundgroup.html#soundgroup_getmutefadespeed" title="Retrieves the current mute fade time.">SoundGroup::getMuteFadeSpeed</a> Retrieves the current mute fade time.</span></li>
<li><span><a class="apilink" href="core-api-soundgroup.html#soundgroup_setvolume" title="Sets the volume of the sound group.">SoundGroup::setVolume</a> Sets the volume of the sound group.</span></li>
<li><span><a class="apilink" href="core-api-soundgroup.html#soundgroup_getvolume" title="Retrieves the volume of the sound group.">SoundGroup::getVolume</a> Retrieves the volume of the sound group.</span></li>
</ul>
<hr />
<ul>
<li><span><a class="apilink" href="core-api-soundgroup.html#fmod_soundgroup_behavior" title="Values specifying behavior when a sound group's max audible value is exceeded.">FMOD_SOUNDGROUP_BEHAVIOR</a> Values specifying behavior when a sound group's max audible value is exceeded.</span></li>
</ul>
<p><strong>Sound Functions:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-soundgroup.html#soundgroup_setmaxaudible" title="Sets the maximum number of playbacks to be audible at once in a sound group.">SoundGroup::setMaxAudible</a> Sets the maximum number of playbacks to be audible at once in a sound group.</span></li>
<li><span><a class="apilink" href="core-api-soundgroup.html#soundgroup_getmaxaudible" title="Retrieves the maximum number of playbacks to be audible at once in a sound group.">SoundGroup::getMaxAudible</a> Retrieves the maximum number of playbacks to be audible at once in a sound group.</span></li>
<li><span><a class="apilink" href="core-api-soundgroup.html#soundgroup_getnumsounds" title="Retrieves the current number of sounds in this sound group.">SoundGroup::getNumSounds</a> Retrieves the current number of sounds in this sound group.</span></li>
<li><span><a class="apilink" href="core-api-soundgroup.html#soundgroup_getsound" title="Retrieves a sound.">SoundGroup::getSound</a> Retrieves a sound.</span></li>
<li><span><a class="apilink" href="core-api-soundgroup.html#soundgroup_getnumplaying" title="Retrieves the number of currently playing Channels for the SoundGroup.">SoundGroup::getNumPlaying</a> Retrieves the number of currently playing Channels for the SoundGroup.</span></li>
<li><span><a class="apilink" href="core-api-soundgroup.html#soundgroup_stop" title="Stops all sounds within this soundgroup.">SoundGroup::stop</a> Stops all sounds within this soundgroup.</span></li>
</ul>
<p><strong>General:</strong></p>
<ul>
<li><span><a class="apilink" href="core-api-soundgroup.html#soundgroup_getname" title="Retrieves the name of the sound group.">SoundGroup::getName</a> Retrieves the name of the sound group.</span></li>
<li><span><a class="apilink" href="core-api-soundgroup.html#soundgroup_release" title="Releases a soundgroup object and returns all sounds back to the master sound group.">SoundGroup::release</a> Releases a soundgroup object and returns all sounds back to the master sound group.</span></li>
<li><span><a class="apilink" href="core-api-soundgroup.html#soundgroup_setuserdata" title="Sets a user value associated with this object.">SoundGroup::setUserData</a> Sets a user value associated with this object.</span></li>
<li><span><a class="apilink" href="core-api-soundgroup.html#soundgroup_getuserdata" title="Retrieves a user value associated with this object.">SoundGroup::getUserData</a> Retrieves a user value associated with this object.</span></li>
<li><span><a class="apilink" href="core-api-soundgroup.html#soundgroup_getsystemobject" title="Retrieves the parent System object.">SoundGroup::getSystemObject</a> Retrieves the parent System object.</span></li>
</ul>
<h2 api="enum" id="fmod_soundgroup_behavior"><a href="#fmod_soundgroup_behavior">FMOD_SOUNDGROUP_BEHAVIOR</a></h2>
<p>Values specifying behavior when a sound group's max audible value is exceeded.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-c-cpp"><pre><span></span><span class="k">typedef</span> <span class="k">enum</span> <span class="n">FMOD_SOUNDGROUP_BEHAVIOR</span> <span class="p">{</span>
<span class="n">FMOD_SOUNDGROUP_BEHAVIOR_FAIL</span><span class="p">,</span>
<span class="n">FMOD_SOUNDGROUP_BEHAVIOR_MUTE</span><span class="p">,</span>
<span class="n">FMOD_SOUNDGROUP_BEHAVIOR_STEALLOWEST</span><span class="p">,</span>
<span class="n">FMOD_SOUNDGROUP_BEHAVIOR_MAX</span>
<span class="p">}</span> <span class="n">FMOD_SOUNDGROUP_BEHAVIOR</span><span class="p">;</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="k">enum</span> <span class="n">SOUNDGROUP_BEHAVIOR</span>
<span class="p">{</span>
<span class="n">BEHAVIOR_FAIL</span><span class="p">,</span>
<span class="n">BEHAVIOR_MUTE</span><span class="p">,</span>
<span class="n">BEHAVIOR_STEALLOWEST</span><span class="p">,</span>
<span class="n">MAX</span><span class="p">,</span>
<span class="p">}</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">FMOD</span><span class="p">.</span><span class="nx">SOUNDGROUP_BEHAVIOR_FAIL</span>
<span class="nx">FMOD</span><span class="p">.</span><span class="nx">SOUNDGROUP_BEHAVIOR_MUTE</span>
<span class="nx">FMOD</span><span class="p">.</span><span class="nx">SOUNDGROUP_BEHAVIOR_STEALLOWEST</span>
<span class="nx">FMOD</span><span class="p">.</span><span class="nx">SOUNDGROUP_BEHAVIOR_MAX</span>
</pre></div>
<dl>
<dt id="fmod_soundgroup_behavior_fail">FMOD_SOUNDGROUP_BEHAVIOR_FAIL</dt>
<dd>Excess sounds will fail when calling <a class="apilink" href="core-api-system.html#system_playsound">System::playSound</a>.</dd>
<dt id="fmod_soundgroup_behavior_mute">FMOD_SOUNDGROUP_BEHAVIOR_MUTE</dt>
<dd>Excess sounds will begin mute and will become audible when sufficient sounds are stopped.</dd>
<dt id="fmod_soundgroup_behavior_steallowest">FMOD_SOUNDGROUP_BEHAVIOR_STEALLOWEST</dt>
<dd>Excess sounds will steal from the quietest <a class="apilink" href="core-api-sound.html">Sound</a> playing in the group.</dd>
<dt id="fmod_soundgroup_behavior_max">FMOD_SOUNDGROUP_BEHAVIOR_MAX</dt>
<dd>Maximum number of <a class="apilink" href="core-api-soundgroup.html">SoundGroup</a> behaviors. </dd>
</dl>
<p>When using <a class="apilink" href="core-api-soundgroup.html#fmod_soundgroup_behavior_mute">FMOD_SOUNDGROUP_BEHAVIOR_MUTE</a>, <a class="apilink" href="core-api-soundgroup.html#soundgroup_setmutefadespeed">SoundGroup::setMuteFadeSpeed</a> can be used to stop a sudden transition.<br />
Instead, the time specified will be used to cross fade between the sounds that go silent and the ones that become audible.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-soundgroup.html#soundgroup_setmaxaudiblebehavior">SoundGroup::setMaxAudibleBehavior</a>, <a class="apilink" href="core-api-soundgroup.html#soundgroup_getmaxaudiblebehavior">SoundGroup::getMaxAudibleBehavior</a>, <a class="apilink" href="core-api-soundgroup.html#soundgroup_setmaxaudible">SoundGroup::setMaxAudible</a>, <a class="apilink" href="core-api-soundgroup.html#soundgroup_getmaxaudible">SoundGroup::getMaxAudible</a>, <a class="apilink" href="core-api-soundgroup.html#soundgroup_setmutefadespeed">SoundGroup::setMuteFadeSpeed</a>, <a class="apilink" href="core-api-soundgroup.html#soundgroup_getmutefadespeed">SoundGroup::getMuteFadeSpeed</a></p>
<h2 api="function" id="soundgroup_getmaxaudible"><a href="#soundgroup_getmaxaudible">SoundGroup::getMaxAudible</a></h2>
<p>Retrieves the maximum number of playbacks to be audible at once in a sound group.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">SoundGroup</span><span class="o">::</span><span class="n">getMaxAudible</span><span class="p">(</span>
<span class="kt">int</span> <span class="o">*</span><span class="n">maxaudible</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_SoundGroup_GetMaxAudible</span><span class="p">(</span>
<span class="n">FMOD_SOUNDGROUP</span> <span class="o">*</span><span class="n">soundgroup</span><span class="p">,</span>
<span class="kt">int</span> <span class="o">*</span><span class="n">maxaudible</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">SoundGroup</span><span class="p">.</span><span class="n">getMaxAudible</span><span class="p">(</span>
<span class="k">out</span> <span class="kt">int</span> <span class="n">maxaudible</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">SoundGroup</span><span class="p">.</span><span class="nx">getMaxAudible</span><span class="p">(</span>
<span class="nx">maxaudible</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>maxaudible <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>
<p>Maximum number of playbacks to be audible at once.</p>
<ul>
<li><span class="label">Range:</span> [-1, inf)</li>
<li><span class="label">Default:</span> -1</li>
</ul>
</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-soundgroup.html#soundgroup_setmaxaudible">SoundGroup::setMaxAudible</a></p>
<h2 api="function" id="soundgroup_getmaxaudiblebehavior"><a href="#soundgroup_getmaxaudiblebehavior">SoundGroup::getMaxAudibleBehavior</a></h2>
<p>Retrieves the current max audible behavior.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">SoundGroup</span><span class="o">::</span><span class="n">getMaxAudibleBehavior</span><span class="p">(</span>
<span class="n">FMOD_SOUNDGROUP_BEHAVIOR</span> <span class="o">*</span><span class="n">behavior</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_SoundGroup_GetMaxAudibleBehavior</span><span class="p">(</span>
<span class="n">FMOD_SOUNDGROUP</span> <span class="o">*</span><span class="n">soundgroup</span><span class="p">,</span>
<span class="n">FMOD_SOUNDGROUP_BEHAVIOR</span> <span class="o">*</span><span class="n">behavior</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">SoundGroup</span><span class="p">.</span><span class="n">getMaxAudibleBehavior</span><span class="p">(</span>
<span class="k">out</span> <span class="n">SOUNDGROUP_BEHAVIOR</span> <span class="n">behavior</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">SoundGroup</span><span class="p">.</span><span class="nx">getMaxAudibleBehavior</span><span class="p">(</span>
<span class="nx">behavior</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>behavior <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>
<p><a class="apilink" href="core-api-soundgroup.html">SoundGroup</a> max playbacks behavior. (<a class="apilink" href="core-api-soundgroup.html#fmod_soundgroup_behavior">FMOD_SOUNDGROUP_BEHAVIOR</a>)</p>
<ul>
<li><span class="label">Default:</span> <a class="apilink" href="core-api-soundgroup.html#fmod_soundgroup_behavior_fail">FMOD_SOUNDGROUP_BEHAVIOR_FAIL</a></li>
</ul>
</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-soundgroup.html#soundgroup_setmaxaudiblebehavior">SoundGroup::setMaxAudibleBehavior</a></p>
<h2 api="function" id="soundgroup_getmutefadespeed"><a href="#soundgroup_getmutefadespeed">SoundGroup::getMuteFadeSpeed</a></h2>
<p>Retrieves the current mute fade time.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">SoundGroup</span><span class="o">::</span><span class="n">getMuteFadeSpeed</span><span class="p">(</span>
<span class="kt">float</span> <span class="o">*</span><span class="n">speed</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_SoundGroup_GetMuteFadeSpeed</span><span class="p">(</span>
<span class="n">FMOD_SOUNDGROUP</span> <span class="o">*</span><span class="n">soundgroup</span><span class="p">,</span>
<span class="kt">float</span> <span class="o">*</span><span class="n">speed</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">SoundGroup</span><span class="p">.</span><span class="n">getMuteFadeSpeed</span><span class="p">(</span>
<span class="k">out</span> <span class="kt">float</span> <span class="n">speed</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">SoundGroup</span><span class="p">.</span><span class="nx">getMuteFadeSpeed</span><span class="p">(</span>
<span class="nx">speed</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>speed <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>
<p>Fade time. 0 = no fading.</p>
<ul>
<li><span class="label">Units:</span> Seconds</li>
<li><span class="label">Range:</span> [0, inf)</li>
<li><span class="label">Default:</span> 0</li>
</ul>
</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-soundgroup.html#soundgroup_setmutefadespeed">SoundGroup::setMuteFadeSpeed</a></p>
<h2 api="function" id="soundgroup_getname"><a href="#soundgroup_getname">SoundGroup::getName</a></h2>
<p>Retrieves the name of the sound group.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">SoundGroup</span><span class="o">::</span><span class="n">getName</span><span class="p">(</span>
<span class="kt">char</span> <span class="o">*</span><span class="n">name</span><span class="p">,</span>
<span class="kt">int</span> <span class="n">namelen</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_SoundGroup_GetName</span><span class="p">(</span>
<span class="n">FMOD_SOUNDGROUP</span> <span class="o">*</span><span class="n">soundgroup</span><span class="p">,</span>
<span class="kt">char</span> <span class="o">*</span><span class="n">name</span><span class="p">,</span>
<span class="kt">int</span> <span class="n">namelen</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">SoundGroup</span><span class="p">.</span><span class="n">getName</span><span class="p">(</span>
<span class="k">out</span> <span class="kt">string</span> <span class="n">name</span><span class="p">,</span>
<span class="kt">int</span> <span class="n">namelen</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">SoundGroup</span><span class="p">.</span><span class="nx">getName</span><span class="p">(</span>
<span class="nx">name</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>name <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>Name of the <a class="apilink" href="core-api-soundgroup.html">SoundGroup</a>. (<a href="glossary.html#string-format">UTF-8 string</a>)</dd>
<dt>namelen</dt>
<dd>
<p>Length of <code>name</code>.</p>
<ul>
<li><span class="label">Units:</span> Bytes</li>
</ul>
</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-system.html#system_createsoundgroup">System::createSoundGroup</a></p>
<h2 api="function" id="soundgroup_getnumplaying"><a href="#soundgroup_getnumplaying">SoundGroup::getNumPlaying</a></h2>
<p>Retrieves the number of currently playing Channels for the SoundGroup.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">SoundGroup</span><span class="o">::</span><span class="n">getNumPlaying</span><span class="p">(</span>
<span class="kt">int</span> <span class="o">*</span><span class="n">numplaying</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_SoundGroup_GetNumPlaying</span><span class="p">(</span>
<span class="n">FMOD_SOUNDGROUP</span> <span class="o">*</span><span class="n">soundgroup</span><span class="p">,</span>
<span class="kt">int</span> <span class="o">*</span><span class="n">numplaying</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">SoundGroup</span><span class="p">.</span><span class="n">getNumPlaying</span><span class="p">(</span>
<span class="k">out</span> <span class="kt">int</span> <span class="n">numplaying</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">SoundGroup</span><span class="p">.</span><span class="nx">getNumPlaying</span><span class="p">(</span>
<span class="nx">numplaying</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>numplaying <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>Number of actively playing <a class="apilink" href="core-api-channel.html">Channel</a>s from sounds in this <a class="apilink" href="core-api-soundgroup.html">SoundGroup</a>.</dd>
</dl>
<p>This routine returns the number of <a class="apilink" href="core-api-channel.html">Channel</a>s playing. If the <a class="apilink" href="core-api-soundgroup.html">SoundGroup</a> only has one <a class="apilink" href="core-api-sound.html">Sound</a>, and that <a class="apilink" href="core-api-sound.html">Sound</a> is playing twice, the figure returned will be two.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-system.html#system_createsoundgroup">System::createSoundGroup</a>, <a class="apilink" href="core-api-system.html#system_getmastersoundgroup">System::getMasterSoundGroup</a></p>
<h2 api="function" id="soundgroup_getnumsounds"><a href="#soundgroup_getnumsounds">SoundGroup::getNumSounds</a></h2>
<p>Retrieves the current number of sounds in this sound group.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">SoundGroup</span><span class="o">::</span><span class="n">getNumSounds</span><span class="p">(</span>
<span class="kt">int</span> <span class="o">*</span><span class="n">numsounds</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_SoundGroup_GetNumSounds</span><span class="p">(</span>
<span class="n">FMOD_SOUNDGROUP</span> <span class="o">*</span><span class="n">soundgroup</span><span class="p">,</span>
<span class="kt">int</span> <span class="o">*</span><span class="n">numsounds</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">SoundGroup</span><span class="p">.</span><span class="n">getNumSounds</span><span class="p">(</span>
<span class="k">out</span> <span class="kt">int</span> <span class="n">numsounds</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">SoundGroup</span><span class="p">.</span><span class="nx">getNumSounds</span><span class="p">(</span>
<span class="nx">numsounds</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>numsounds <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>Number of <a class="apilink" href="core-api-sound.html">Sound</a>s in this <a class="apilink" href="core-api-soundgroup.html">SoundGroup</a>.</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-soundgroup.html#soundgroup_getsound">SoundGroup::getSound</a></p>
<h2 api="function" id="soundgroup_getsound"><a href="#soundgroup_getsound">SoundGroup::getSound</a></h2>
<p>Retrieves a sound.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">SoundGroup</span><span class="o">::</span><span class="n">getSound</span><span class="p">(</span>
<span class="kt">int</span> <span class="n">index</span><span class="p">,</span>
<span class="n">Sound</span> <span class="o">**</span><span class="n">sound</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_SoundGroup_GetSound</span><span class="p">(</span>
<span class="n">FMOD_SOUNDGROUP</span> <span class="o">*</span><span class="n">soundgroup</span><span class="p">,</span>
<span class="kt">int</span> <span class="n">index</span><span class="p">,</span>
<span class="n">FMOD_SOUND</span> <span class="o">**</span><span class="n">sound</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">SoundGroup</span><span class="p">.</span><span class="n">getSound</span><span class="p">(</span>
<span class="kt">int</span> <span class="n">index</span><span class="p">,</span>
<span class="k">out</span> <span class="n">Sound</span> <span class="n">sound</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">SoundGroup</span><span class="p">.</span><span class="nx">getSound</span><span class="p">(</span>
<span class="nx">index</span><span class="p">,</span>
<span class="nx">sound</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>index</dt>
<dd>Index of the sound.</dd>
<dt>sound <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>Sound object. (<a class="apilink" href="core-api-sound.html">Sound</a>)</dd>
</dl>
<p>Use <a class="apilink" href="core-api-soundgroup.html#soundgroup_getnumsounds">SoundGroup::getNumSounds</a> in conjunction with this function to enumerate all sounds in a <a class="apilink" href="core-api-soundgroup.html">SoundGroup</a>.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-system.html#system_createsound">System::createSound</a></p>
<h2 api="function" id="soundgroup_getsystemobject"><a href="#soundgroup_getsystemobject">SoundGroup::getSystemObject</a></h2>
<p>Retrieves the parent System object.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">SoundGroup</span><span class="o">::</span><span class="n">getSystemObject</span><span class="p">(</span>
<span class="n">System</span> <span class="o">**</span><span class="n">system</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_SoundGroup_GetSystemObject</span><span class="p">(</span>
<span class="n">FMOD_SOUNDGROUP</span> <span class="o">*</span><span class="n">soundgroup</span><span class="p">,</span>
<span class="n">FMOD_SYSTEM</span> <span class="o">**</span><span class="n">system</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">SoundGroup</span><span class="p">.</span><span class="n">getSystemObject</span><span class="p">(</span>
<span class="k">out</span> <span class="n">System</span> <span class="n">system</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">SoundGroup</span><span class="p">.</span><span class="nx">getSystemObject</span><span class="p">(</span>
<span class="nx">system</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>system <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>System object. (<a class="apilink" href="core-api-system.html">System</a>)</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-system.html#system_createsoundgroup">System::createSoundGroup</a>, <a class="apilink" href="core-api-system.html#system_getmastersoundgroup">System::getMasterSoundGroup</a></p>
<h2 api="function" id="soundgroup_getuserdata"><a href="#soundgroup_getuserdata">SoundGroup::getUserData</a></h2>
<p>Retrieves a user value associated with this object.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">SoundGroup</span><span class="o">::</span><span class="n">getUserData</span><span class="p">(</span>
<span class="kt">void</span> <span class="o">**</span><span class="n">userdata</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_SoundGroup_GetUserData</span><span class="p">(</span>
<span class="n">FMOD_SOUNDGROUP</span> <span class="o">*</span><span class="n">soundgroup</span><span class="p">,</span>
<span class="kt">void</span> <span class="o">**</span><span class="n">userdata</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">SoundGroup</span><span class="p">.</span><span class="n">getUserData</span><span class="p">(</span>
<span class="k">out</span> <span class="n">IntPtr</span> <span class="n">userdata</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">SoundGroup</span><span class="p">.</span><span class="nx">getUserData</span><span class="p">(</span>
<span class="nx">userdata</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>userdata <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>User data set by calling <a class="apilink" href="core-api-soundgroup.html#soundgroup_setuserdata">SoundGroup::setUserData</a>.</dd>
</dl>
<p>This function allows arbitrary user data to be retrieved from this object. See the <a href="glossary.html#user-data">User Data</a> section of the glossary for an example of how to get and set user data.</p>
<h2 api="function" id="soundgroup_getvolume"><a href="#soundgroup_getvolume">SoundGroup::getVolume</a></h2>
<p>Retrieves the volume of the sound group.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">SoundGroup</span><span class="o">::</span><span class="n">getVolume</span><span class="p">(</span>
<span class="kt">float</span> <span class="o">*</span><span class="n">volume</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_SoundGroup_GetVolume</span><span class="p">(</span>
<span class="n">FMOD_SOUNDGROUP</span> <span class="o">*</span><span class="n">soundgroup</span><span class="p">,</span>
<span class="kt">float</span> <span class="o">*</span><span class="n">volume</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">SoundGroup</span><span class="p">.</span><span class="n">getVolume</span><span class="p">(</span>
<span class="k">out</span> <span class="kt">float</span> <span class="n">volume</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">SoundGroup</span><span class="p">.</span><span class="nx">getVolume</span><span class="p">(</span>
<span class="nx">volume</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>volume <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>
<p>Volume level.</p>
<ul>
<li><span class="label">Units:</span> Linear</li>
<li><span class="label">Range:</span> [0, 1]</li>
<li><span class="label">Default:</span> 1</li>
</ul>
</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-soundgroup.html#soundgroup_setvolume">SoundGroup::setVolume</a></p>
<h2 api="function" id="soundgroup_release"><a href="#soundgroup_release">SoundGroup::release</a></h2>
<p>Releases a soundgroup object and returns all sounds back to the master sound group.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">SoundGroup</span><span class="o">::</span><span class="n">release</span><span class="p">();</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_SoundGroup_Release</span><span class="p">(</span><span class="n">FMOD_SOUNDGROUP</span> <span class="o">*</span><span class="n">soundgroup</span><span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">SoundGroup</span><span class="p">.</span><span class="n">release</span><span class="p">();</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">SoundGroup</span><span class="p">.</span><span class="nx">release</span><span class="p">();</span>
</pre></div>
<p>You cannot release the master <a class="apilink" href="core-api-soundgroup.html">SoundGroup</a>.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-system.html#system_createsoundgroup">System::createSoundGroup</a>, <a class="apilink" href="core-api-system.html#system_getmastersoundgroup">System::getMasterSoundGroup</a></p>
<h2 api="function" id="soundgroup_setmaxaudible"><a href="#soundgroup_setmaxaudible">SoundGroup::setMaxAudible</a></h2>
<p>Sets the maximum number of playbacks to be audible at once in a sound group.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">SoundGroup</span><span class="o">::</span><span class="n">setMaxAudible</span><span class="p">(</span>
<span class="kt">int</span> <span class="n">maxaudible</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_SoundGroup_SetMaxAudible</span><span class="p">(</span>
<span class="n">FMOD_SOUNDGROUP</span> <span class="o">*</span><span class="n">soundgroup</span><span class="p">,</span>
<span class="kt">int</span> <span class="n">maxaudible</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">SoundGroup</span><span class="p">.</span><span class="n">setMaxAudible</span><span class="p">(</span>
<span class="kt">int</span> <span class="n">maxaudible</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">SoundGroup</span><span class="p">.</span><span class="nx">setMaxAudible</span><span class="p">(</span>
<span class="nx">maxaudible</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>maxaudible</dt>
<dd>
<p>Maximum number of playbacks to be audible at once. -1 denotes unlimited.</p>
<ul>
<li><span class="label">Range:</span> [-1, inf)</li>
<li><span class="label">Default:</span> -1</li>
</ul>
</dd>
</dl>
<p>If playing instances of sounds in this group equal or exceed number specified here, attepts to play more of the sounds with be met with <a class="apilink" href="core-api-common.html#fmod_err_maxaudible">FMOD_ERR_MAXAUDIBLE</a> by default. <br />
Use <a class="apilink" href="core-api-soundgroup.html#soundgroup_setmaxaudiblebehavior">SoundGroup::setMaxAudibleBehavior</a> to change the way the sound playback behaves when too many sounds are playing. Muting, failing and stealing behaviors can be specified. See <a class="apilink" href="core-api-soundgroup.html#fmod_soundgroup_behavior">FMOD_SOUNDGROUP_BEHAVIOR</a>.</p>
<p><a class="apilink" href="core-api-soundgroup.html#soundgroup_getnumplaying">SoundGroup::getNumPlaying</a> can be used to determine how many instances of the sounds in the <a class="apilink" href="core-api-soundgroup.html">SoundGroup</a> are currently playing.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-soundgroup.html#soundgroup_getmaxaudible">SoundGroup::getMaxAudible</a>, <a class="apilink" href="core-api-soundgroup.html#soundgroup_setmaxaudiblebehavior">SoundGroup::setMaxAudibleBehavior</a>, <a class="apilink" href="core-api-soundgroup.html#soundgroup_getmaxaudiblebehavior">SoundGroup::getMaxAudibleBehavior</a></p>
<h2 api="function" id="soundgroup_setmaxaudiblebehavior"><a href="#soundgroup_setmaxaudiblebehavior">SoundGroup::setMaxAudibleBehavior</a></h2>
<p>This function changes the way the sound playback behaves when too many sounds are playing in a soundgroup.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">SoundGroup</span><span class="o">::</span><span class="n">setMaxAudibleBehavior</span><span class="p">(</span>
<span class="n">FMOD_SOUNDGROUP_BEHAVIOR</span> <span class="n">behavior</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_SoundGroup_SetMaxAudibleBehavior</span><span class="p">(</span>
<span class="n">FMOD_SOUNDGROUP</span> <span class="o">*</span><span class="n">soundgroup</span><span class="p">,</span>
<span class="n">FMOD_SOUNDGROUP_BEHAVIOR</span> <span class="n">behavior</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">SoundGroup</span><span class="p">.</span><span class="n">setMaxAudibleBehavior</span><span class="p">(</span>
<span class="n">SOUNDGROUP_BEHAVIOR</span> <span class="n">behavior</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">SoundGroup</span><span class="p">.</span><span class="nx">setMaxAudibleBehavior</span><span class="p">(</span>
<span class="nx">behavior</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>behavior</dt>
<dd>
<p><a class="apilink" href="core-api-soundgroup.html">SoundGroup</a> max playbacks behavior. (<a class="apilink" href="core-api-soundgroup.html#fmod_soundgroup_behavior">FMOD_SOUNDGROUP_BEHAVIOR</a>)</p>
<ul>
<li><span class="label">Default:</span> <a class="apilink" href="core-api-soundgroup.html#fmod_soundgroup_behavior_fail">FMOD_SOUNDGROUP_BEHAVIOR_FAIL</a></li>
</ul>
</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-soundgroup.html#soundgroup_getmaxaudiblebehavior">SoundGroup::getMaxAudibleBehavior</a>, <a class="apilink" href="core-api-soundgroup.html#soundgroup_setmaxaudible">SoundGroup::setMaxAudible</a>, <a class="apilink" href="core-api-soundgroup.html#soundgroup_getmaxaudible">SoundGroup::getMaxAudible</a></p>
<h2 api="function" id="soundgroup_setmutefadespeed"><a href="#soundgroup_setmutefadespeed">SoundGroup::setMuteFadeSpeed</a></h2>
<p>Sets a mute fade time.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">SoundGroup</span><span class="o">::</span><span class="n">setMuteFadeSpeed</span><span class="p">(</span>
<span class="kt">float</span> <span class="n">speed</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_SoundGroup_SetMuteFadeSpeed</span><span class="p">(</span>
<span class="n">FMOD_SOUNDGROUP</span> <span class="o">*</span><span class="n">soundgroup</span><span class="p">,</span>
<span class="kt">float</span> <span class="n">speed</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">SoundGroup</span><span class="p">.</span><span class="n">setMuteFadeSpeed</span><span class="p">(</span>
<span class="kt">float</span> <span class="n">speed</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">SoundGroup</span><span class="p">.</span><span class="nx">setMuteFadeSpeed</span><span class="p">(</span>
<span class="nx">speed</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>speed</dt>
<dd>
<p>Fade time. 0 = no fading.</p>
<ul>
<li><span class="label">Units:</span> Seconds</li>
<li><span class="label">Range:</span> [0, inf)</li>
<li><span class="label">Default:</span> 0</li>
</ul>
</dd>
</dl>
<p>If a mode besides <a class="apilink" href="core-api-soundgroup.html#fmod_soundgroup_behavior_mute">FMOD_SOUNDGROUP_BEHAVIOR_MUTE</a> is used, the fade speed is ignored.</p>
<p>When more sounds are playing in a SoundGroup than are specified with <a class="apilink" href="core-api-soundgroup.html#soundgroup_setmaxaudible">SoundGroup::setMaxAudible</a>, the least important <a class="apilink" href="core-api-sound.html">Sound</a> (ie lowest priority / lowest audible volume due to 3D position, volume etc) will fade to silence if <a class="apilink" href="core-api-soundgroup.html#fmod_soundgroup_behavior_mute">FMOD_SOUNDGROUP_BEHAVIOR_MUTE</a> is used, and any previous sounds that were silent because of this rule will fade in if they are more important.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-soundgroup.html#soundgroup_getmutefadespeed">SoundGroup::getMuteFadeSpeed</a></p>
<h2 api="function" id="soundgroup_setuserdata"><a href="#soundgroup_setuserdata">SoundGroup::setUserData</a></h2>
<p>Sets a user value associated with this object.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">SoundGroup</span><span class="o">::</span><span class="n">setUserData</span><span class="p">(</span>
<span class="kt">void</span> <span class="o">*</span><span class="n">userdata</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_SoundGroup_SetUserData</span><span class="p">(</span>
<span class="n">FMOD_SOUNDGROUP</span> <span class="o">*</span><span class="n">soundgroup</span><span class="p">,</span>
<span class="kt">void</span> <span class="o">*</span><span class="n">userdata</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">SoundGroup</span><span class="p">.</span><span class="n">setUserData</span><span class="p">(</span>
<span class="n">IntPtr</span> <span class="n">userdata</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">SoundGroup</span><span class="p">.</span><span class="nx">setUserData</span><span class="p">(</span>
<span class="nx">userdata</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>userdata</dt>
<dd>Value stored on this object.</dd>
</dl>
<p>This function allows arbitrary user data to be attached to this object. See the <a href="glossary.html#user-data">User Data</a> section of the glossary for an example of how to get and set user data.</p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-soundgroup.html#soundgroup_getuserdata">SoundGroup::getUserData</a></p>
<h2 api="function" id="soundgroup_setvolume"><a href="#soundgroup_setvolume">SoundGroup::setVolume</a></h2>
<p>Sets the volume of the sound group.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">SoundGroup</span><span class="o">::</span><span class="n">setVolume</span><span class="p">(</span>
<span class="kt">float</span> <span class="n">volume</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_SoundGroup_SetVolume</span><span class="p">(</span>
<span class="n">FMOD_SOUNDGROUP</span> <span class="o">*</span><span class="n">soundgroup</span><span class="p">,</span>
<span class="kt">float</span> <span class="n">volume</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">SoundGroup</span><span class="p">.</span><span class="n">setVolume</span><span class="p">(</span>
<span class="kt">float</span> <span class="n">volume</span>
<span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">SoundGroup</span><span class="p">.</span><span class="nx">setVolume</span><span class="p">(</span>
<span class="nx">volume</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>volume</dt>
<dd>
<p>Volume level.</p>
<ul>
<li><span class="label">Units:</span> Linear</li>
<li><span class="label">Range:</span> [0, 1]</li>
<li><span class="label">Default:</span> 1</li>
</ul>
</dd>
</dl>
<p>Scales the volume of all <a class="apilink" href="core-api-channel.html">Channel</a>s playing <a class="apilink" href="core-api-sound.html">Sound</a>s in this <a class="apilink" href="core-api-soundgroup.html">SoundGroup</a>. </p>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-soundgroup.html#soundgroup_getvolume">SoundGroup::getVolume</a></p>
<h2 api="function" id="soundgroup_stop"><a href="#soundgroup_stop">SoundGroup::stop</a></h2>
<p>Stops all sounds within this soundgroup.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="n">SoundGroup</span><span class="o">::</span><span class="n">stop</span><span class="p">();</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_RESULT</span> <span class="nf">FMOD_SoundGroup_Stop</span><span class="p">(</span><span class="n">FMOD_SOUNDGROUP</span> <span class="o">*</span><span class="n">soundgroup</span><span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">RESULT</span> <span class="n">SoundGroup</span><span class="p">.</span><span class="n">stop</span><span class="p">();</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="nx">SoundGroup</span><span class="p">.</span><span class="nx">stop</span><span class="p">();</span>
</pre></div>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-system.html#system_playsound">System::playSound</a></p></div>
<p class="manual-footer">FMOD Engine User Manual 2.03.13 (2026-03-31). &copy; 2026 Firelight Technologies Pty Ltd.</p>
</div>
</body>
</html>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,59 @@
<html>
<head>
<title>Core API Reference</title>
<link rel="stylesheet" href="style/docs.css">
<link rel="stylesheet" href="style/code_highlight.css">
<script type="text/javascript" src="scripts/language-selector.js"></script></head>
<body>
<div class="docs-body">
<div class="manual-toc">
<p>FMOD Engine User Manual 2.03</p>
<ul>
<li><a href="welcome.html">Welcome to the FMOD Engine</a></li>
<li><a href="core-api-concepts.html">Core API Key Concepts</a></li>
<li><a href="running-the-core-api.html">Core API Getting Started</a></li>
<li><a href="loading-and-playing-sounds-in-the-core-api.html">Core API Loading and Playing Sounds</a></li>
<li><a href="spatializing-sounds-in-the-core-api.html">Core API Spatializing Sounds</a></li>
<li><a href="mixing-and-routing-in-the-core-api.html">Core API Mixing and Routing</a></li>
<li><a href="using-dsp-effects-in-the-core-api.html">Core API Using DSP Effects</a></li>
<li><a href="effects-reference.html">Core API Effect Reference</a></li>
<li><a href="managing-resources-in-the-core-api.html">Core API Managing Resources</a></li>
<li><a href="advanced-core-api-topics.html">Core API Advanced Topics</a></li>
<li class="manual-current-chapter manual-active-chapter"><a href="core-api.html">Core API Reference</a><ul class="subchapters"><li><a href="core-api-common.html">Common</a></li><li><a href="core-api-common-dsp-effects.html">Effect Parameters</a></li><li><a href="core-api-system.html">System</a></li><li><a href="core-api-sound.html">Sound</a></li><li><a href="core-api-channelcontrol.html">ChannelControl</a></li><li><a href="core-api-channel.html">Channel</a></li><li><a href="core-api-channelgroup.html">ChannelGroup</a></li><li><a href="core-api-soundgroup.html">SoundGroup</a></li><li><a href="core-api-dsp.html">DSP</a></li><li><a href="core-api-dspconnection.html">DSPConnection</a></li><li><a href="core-api-geometry.html">Geometry</a></li><li><a href="core-api-reverb3d.html">Reverb3D</a></li><li><a href="core-api-platform-ios.html">iOS Specific</a></li><li><a href="core-api-platform-android.html">Android Specific</a></li><li><a href="core-api-platform-html5.html">HTML5 Specific</a></li></ul></li>
<li><a href="studio-api-getting-started.html">Studio API Getting Started</a></li>
<li><a href="studio-guide.html">Studio API Guide</a></li>
<li><a href="studio-api-3d-events.html">Studio API 3D Events</a></li>
<li><a href="studio-api-threads.html">Studio API Threads</a></li>
<li><a href="studio-api.html">Studio API Reference</a></li>
<li><a href="platforms.html">Platform Details</a></li>
<li><a href="dsp-plugin-api-guide.html">Plug-in DSP API Guide</a></li>
<li><a href="plugin-api.html">Plug-in API Reference</a></li>
<li><a href="fsbank-api.html">FSBank API Reference</a></li>
<li><a href="troubleshooting.html">Troubleshooting</a></li>
<li><a href="glossary.html">Glossary</a></li>
</ul>
</div>
<div class="manual-content api">
<h1>11. Core API Reference</h1>
<ul class="docs-body-subchapters"><li><a href="core-api-common.html">Common</a></li>
<li><a href="core-api-common-dsp-effects.html">Effect Parameters</a></li>
<li><a href="core-api-system.html">System</a></li>
<li><a href="core-api-sound.html">Sound</a></li>
<li><a href="core-api-channelcontrol.html">ChannelControl</a></li>
<li><a href="core-api-channel.html">Channel</a></li>
<li><a href="core-api-channelgroup.html">ChannelGroup</a></li>
<li><a href="core-api-soundgroup.html">SoundGroup</a></li>
<li><a href="core-api-dsp.html">DSP</a></li>
<li><a href="core-api-dspconnection.html">DSPConnection</a></li>
<li><a href="core-api-geometry.html">Geometry</a></li>
<li><a href="core-api-reverb3d.html">Reverb3D</a></li>
<li><a href="core-api-platform-ios.html">iOS Specific</a></li>
<li><a href="core-api-platform-android.html">Android Specific</a></li>
<li><a href="core-api-platform-html5.html">HTML5 Specific</a></li>
</ul></div>
<p class="manual-footer">FMOD Engine User Manual 2.03.13 (2026-03-31). &copy; 2026 Firelight Technologies Pty Ltd.</p>
</div>
</body>
</html>
@@ -0,0 +1,254 @@
<html>
<head>
<title>Plug-in DSP API Guide</title>
<link rel="stylesheet" href="style/docs.css">
<link rel="stylesheet" href="style/code_highlight.css">
<script type="text/javascript" src="scripts/language-selector.js"></script></head>
<body>
<div class="docs-body">
<div class="manual-toc">
<p>FMOD Engine User Manual 2.03</p>
<ul>
<li><a href="welcome.html">Welcome to the FMOD Engine</a></li>
<li><a href="core-api-concepts.html">Core API Key Concepts</a></li>
<li><a href="running-the-core-api.html">Core API Getting Started</a></li>
<li><a href="loading-and-playing-sounds-in-the-core-api.html">Core API Loading and Playing Sounds</a></li>
<li><a href="spatializing-sounds-in-the-core-api.html">Core API Spatializing Sounds</a></li>
<li><a href="mixing-and-routing-in-the-core-api.html">Core API Mixing and Routing</a></li>
<li><a href="using-dsp-effects-in-the-core-api.html">Core API Using DSP Effects</a></li>
<li><a href="effects-reference.html">Core API Effect Reference</a></li>
<li><a href="managing-resources-in-the-core-api.html">Core API Managing Resources</a></li>
<li><a href="advanced-core-api-topics.html">Core API Advanced Topics</a></li>
<li><a href="core-api.html">Core API Reference</a></li>
<li><a href="studio-api-getting-started.html">Studio API Getting Started</a></li>
<li><a href="studio-guide.html">Studio API Guide</a></li>
<li><a href="studio-api-3d-events.html">Studio API 3D Events</a></li>
<li><a href="studio-api-threads.html">Studio API Threads</a></li>
<li><a href="studio-api.html">Studio API Reference</a></li>
<li><a href="platforms.html">Platform Details</a></li>
<li class="manual-current-chapter manual-active-chapter"><a href="dsp-plugin-api-guide.html">Plug-in DSP API Guide</a><ul>
<li><a href="#accessing-plug-ins-in-fmod-studio">Accessing Plug-ins in FMOD Studio</a></li>
<li><a href="#basics">Basics</a><ul>
<li><a href="#building-a-plug-in">Building a Plug-in</a></li>
<li><a href="#loading-the-plug-in-in-the-game">Loading the Plug-in in the Game</a></li>
<li><a href="#plug-in-types">Plug-in Types</a></li>
</ul>
</li>
<li><a href="#plug-in-ui">Plug-in UI</a></li>
<li><a href="#the-plug-in-descriptor">The Plug-in Descriptor</a></li>
<li><a href="#thread-safety">Thread Safety</a></li>
<li><a href="#plug-in-parameters">Plug-in Parameters</a><ul>
<li><a href="#floating-point-parameters">Floating-point Parameters</a></li>
<li><a href="#integer-parameters">Integer Parameters</a></li>
<li><a href="#boolean-parameters">Boolean Parameters</a></li>
<li><a href="#data-parameters">Data Parameters</a></li>
</ul>
</li>
<li><a href="#multiple-plug-ins-within-one-file">Multiple Plug-ins Within One File</a></li>
</ul>
</li>
<li><a href="plugin-api.html">Plug-in API Reference</a></li>
<li><a href="fsbank-api.html">FSBank API Reference</a></li>
<li><a href="troubleshooting.html">Troubleshooting</a></li>
<li><a href="glossary.html">Glossary</a></li>
</ul>
</div>
<div class="manual-content api">
<h1>18. Plug-in DSP API Guide</h1>
<p>Game studios and third-party developers can augment <a href="glossary.html#fmod-studio">FMOD Studio</a>'s built-in suite of <a href="glossary.html#effect">effects</a> and sound modules by creating their own plug-ins. By placing plug-ins in FMOD Studio's plug-ins folder, these can be added to tracks or buses, <a href="https://fmod.com/docs/2.03/studio/glossary.html#modulator">modulated</a> and automated by game parameters just like built-in effect and sound modules.</p>
<p>This chapter describes how to create plug-ins and make them available to FMOD Studio and your game. We also recommended you follow along with the example plug-ins found in api/core/examples/plugins, as they are fully implemented working effects you can use or base your code on.</p>
<h2 id="accessing-plug-ins-in-fmod-studio"><a href="#accessing-plug-ins-in-fmod-studio">18.1 Accessing Plug-ins in FMOD Studio</a></h2>
<p>A plug-in must be built as a dynamic linked library and placed in the plug-ins folder specified in FMOD Studio's Preferences dialog under the Plug-ins tab. FMOD Studio scans the folder and all sub-folders both on start-up and when the folder is changed by the user. Studio tries to load any libraries it finds (<em>.dll on Windows or </em>.dylib on Mac) and ignores libraries which don't support the API.</p>
<p>Detected plug-in instruments will be available via the track context menu in the Event Editor, whereas detected plug-in effects will show up in the effect deck's Add Effect and Insert Effect context menus. When a plug-in module is added to a track or bus, its panel will be displayed in the effect deck. The panel will be automatically populated with dials, buttons and data drop-zones for each parameter.</p>
<h2 id="basics"><a href="#basics">18.2 Basics</a></h2>
<p>Two versions of the plug-in will usually be required - one for FMOD Studio and one for the game.</p>
<p>Studio will require a dll or dylib file if running in Windows or Mac respectively. These will be loaded dynamically in Studio as described in the previous section.</p>
<p>Another version of the plug-in must be compiled for the game's target platform. This may also be a dynamic library but, in most cases, can (or must) be a static library or simply compiled along with the game code. Each target platform requires its own version of the plugin to ensure compatibility and performance. In each case, game code is required to load the plug-in prior to loading the project or object referencing the plug-in.</p>
<h3 id="building-a-plug-in"><a href="#building-a-plug-in">18.2.1 Building a Plug-in</a></h3>
<p>The <code>fmod_dsp.h</code> header file includes all the necessary type definitions and constants for creating plug-ins including the struct <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_description">FMOD_DSP_DESCRIPTION</a> which defines the plug-in's capabilities and callbacks.</p>
<p>If creating a dynamic library, the library must export <code>FMODGetDSPDescription</code>, e.g.:</p>
<div class="highlight language-c"><pre><span></span><span class="k">extern</span> <span class="s">&quot;C&quot;</span> <span class="p">{</span>
<span class="n">F_EXPORT</span> <span class="n">FMOD_DSP_DESCRIPTION</span><span class="o">*</span> <span class="n">F_CALL</span> <span class="n">FMODGetDSPDescription</span><span class="p">();</span>
<span class="p">}</span>
</pre></div>
<p>The <code>F_EXPORT</code> macro provides the relevant storage class for exporting <code>FMODGetDSPDescription</code>. Some platforms however, such as PS5, cannot automatically provide a definition for this macro. In such cases you will need to manually add a preprocessor definition for <code>F_USE_DECLSPEC</code>, or <code>F_USE_ATTRIBUTE</code> for Linux based platforms, otherwise the built plugin may fail to load.</p>
<p>Dynamic libraries must be compiled for the same architecture as the host (whether FMOD Studio or the game), so if the host is 64-bit, the plug-in must be 64-bit.</p>
<p>A third-party tool, such as the free <a href="https://github.com/lucasg/Dependencies">Dependencies</a>, can be used to verify that the library is able to be loaded and the proper symbol is exported. In Windows, the symbol will look like _FMODGetDSPDescription@0.</p>
<p>If creating a static library, the library should export a symbol with a unique name such as <code>FMOD_YourCompany_YourProduct_GetDSPDescription</code>, e.g.:</p>
<div class="highlight language-c"><pre><span></span><span class="k">extern</span> <span class="s">&quot;C&quot;</span> <span class="p">{</span>
<span class="n">F_EXPORT</span> <span class="n">FMOD_DSP_DESCRIPTION</span><span class="o">*</span> <span class="n">F_CALL</span> <span class="n">FMOD_YourCompany_YourProduct_GetDSPDescription</span><span class="p">();</span>
<span class="p">}</span>
</pre></div>
<p>You should then share this extern'd symbol name in a header so developers can register it at runtime with <a class="apilink" href="core-api-system.html#system_registerdsp">System::registerDSP</a>.</p>
<h3 id="loading-the-plug-in-in-the-game"><a href="#loading-the-plug-in-in-the-game">18.2.2 Loading the Plug-in in the Game</a></h3>
<p>The plug-in must be registered using the FMOD Studio or Core API before the object referencing the plug-in is loaded in the game.</p>
<p>The following functions can be used to register a plug-in if it is statically linked or compiled with the game code:</p>
<div class="highlight language-text"><pre><span></span>FMOD_RESULT FMOD::Studio::System::registerPlugin(const FMOD_DSP_DESCRIPTION* description);
FMOD_RESULT FMOD::System::registerDSP(const FMOD_DSP_DESCRIPTION *description, unsigned int *handle);
</pre></div>
<p>If the plug-in library is to be dynamically loaded, it can be registered using:</p>
<div class="highlight language-text"><pre><span></span>FMOD_RESULT FMOD::System::loadPlugin(const char *filename, unsigned int *handle, unsigned int priority = 0)
</pre></div>
<p>A base plug-in path can be specified using the function:</p>
<div class="highlight language-text"><pre><span></span>FMOD_RESULT FMOD::System::setPluginPath(const char *path)
</pre></div>
<p>If this is set, the filename parameter of <a class="apilink" href="core-api-system.html#system_loadplugin">System::loadPlugin</a> is assumed to be relative to this path.</p>
<p>Plug-ins do not normally need to be unregistered, but it is possible with either of the following functions:</p>
<div class="highlight language-text"><pre><span></span>FMOD_RESULT FMOD::Studio::System::unregisterPlugin(const char* name)
FMOD_RESULT FMOD::System::unloadPlugin(unsigned int handle)
</pre></div>
<p>In these functions, name refers to the name of the plug-in defined in the plug-ins descriptor and handle refers to handle returned by <a class="apilink" href="core-api-system.html#system_loadplugin">System::loadPlugin</a>.</p>
<h3 id="plug-in-types"><a href="#plug-in-types">18.2.3 Plug-in Types</a></h3>
<p>There are two main plug-in types:</p>
<ul>
<li>Effect Modules</li>
<li>Sound Modules</li>
</ul>
<p>Both module types are created in the same way - the difference lies in whether the plug-in processes an audio input.</p>
<p>Effect modules apply effects to an <a href="glossary.html#signal">audio signal</a>. Each effect module has an input and an output. Effect modules can be inserted anywhere in FMOD Studio's signal routing, whether it be on an event's track or a mixer bus. Examples of different types of plug-in effects include:</p>
<ul>
<li>Effects which have the same input and output channel counts such as EQ, compression, distortion, etc...</li>
<li>Effects which perform up- or down-mixing as part of the processing algorithm such as panning or reverb</li>
<li>Spatialization and any distance/direction effects which respond to a sound's 3D location in the game such as 3D panning, distance filtering, early reflections or binaural audio</li>
<li>Side-chaining effects such as compression or audio modulation (e.g. ring modulators)</li>
</ul>
<p>Sound Modules produce their own audio output - they do not have an audio input. Sound modules can be placed on tracks inside Events and can be made to trigger from the timeline, game parameter or within another sound module.</p>
<h2 id="plug-in-ui"><a href="#plug-in-ui">18.3 Plug-in UI</a></h2>
<p>A default user interface will be automatically created by FMOD Studio, assigning a control for each <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_parameter_desc">FMOD_DSP_PARAMETER_DESC</a> exported from your plug-in. The type of UI control assigned to the parameter depends on its <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_parameter_type">FMOD_DSP_PARAMETER_TYPE</a>:</p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Control</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="apilink" href="plugin-api-dsp.html#fmod_dsp_parameter_type_bool">FMOD_DSP_PARAMETER_TYPE_BOOL</a></td>
<td>Button</td>
</tr>
<tr>
<td><a class="apilink" href="plugin-api-dsp.html#fmod_dsp_parameter_type_float">FMOD_DSP_PARAMETER_TYPE_FLOAT</a></td>
<td>Dial</td>
</tr>
<tr>
<td><a class="apilink" href="plugin-api-dsp.html#fmod_dsp_parameter_type_int">FMOD_DSP_PARAMETER_TYPE_INT</a></td>
<td>Dropdown</td>
</tr>
<tr>
<td><a class="apilink" href="plugin-api-dsp.html#fmod_dsp_parameter_type_data">FMOD_DSP_PARAMETER_TYPE_DATA</a></td>
<td>Data Drop</td>
</tr>
</tbody>
</table>
<p>The UI presented in FMOD Studio can be customized inside a <code>.plugin.js</code> using the <a href="https://fmod.com/docs/2.03/studio/plugin-reference.html#plug-in-scripting-api">Plug-In Scripting API</a>. Example <code>.plugin.js</code> files can be found in the "plugins" folder within the FMOD Studio installation directory.</p>
<h2 id="the-plug-in-descriptor"><a href="#the-plug-in-descriptor">18.4 The Plug-in Descriptor</a></h2>
<p>The plug-in descriptor is a struct, <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_description">FMOD_DSP_DESCRIPTION</a> defined in fmod_dsp.h, which describes the capabilities of the plug-in and contains function pointers for all callbacks needed to communicate with FMOD. Data in the descriptor cannot change once the plug-in is loaded. The original struct and its data must stay around until the plug-in is unloaded as data inside this struct is referenced directly within FMOD throughout the lifetime of the plug-in.</p>
<p>The first member, <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_description_pluginsdkversion">FMOD_DSP_DESCRIPTION::pluginsdkversion</a>, must always hold the version number of the plug-in SDK it was complied with. This version is defined as <a class="apilink" href="plugin-api-dsp.html#fmod_plugin_sdk_version">FMOD_PLUGIN_SDK_VERSION</a>. The SDK version is incremented whenever changes to the API occur.</p>
<p>The following two members, <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_description_name">FMOD_DSP_DESCRIPTION::name</a> and <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_description_version">FMOD_DSP_DESCRIPTION::version</a>, identify the plug-in. Each plug-in must have a unique name, usually the company name followed by the product name. Version numbers should not be included in the name in order to allow for future migration of saved data across different versions. Names should not change across versions for the same reason. The version number should be incremented whenever any changes to the plug-in have been made.</p>
<p>Here is a code snippet from the FMOD Gain example which shows how to initialize the first five members of <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_description">FMOD_DSP_DESCRIPTION</a>:</p>
<div class="highlight language-text"><pre><span></span>FMOD_DSP_DESCRIPTION FMOD_Gain_Desc =
{
FMOD_PLUGIN_SDK_VERSION,
&quot;FMOD Gain&quot;, // name
0x00010000, // plug-in version
1, // number of input buffers to process
1, // number of output buffers to process
...
};
</pre></div>
<p>The other descriptor members will be discussed in the following sections.</p>
<h2 id="thread-safety"><a href="#thread-safety">18.5 Thread Safety</a></h2>
<p>Audio callbacks <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_description_read">FMOD_DSP_DESCRIPTION::read</a>, <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_description_process">FMOD_DSP_DESCRIPTION::process</a> and <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_description_shouldiprocess">FMOD_DSP_DESCRIPTION::shouldiprocess</a> are executed in FMOD's mixer thread whereas all other callbacks are executed in the host's thread (game or Studio UI). It is therefore important to ensure thread safety across parameters and states which are shared between those two types of callbacks.</p>
<p>In the FMOD Gain example, two gains are stored: target gain and current gain. target gain stores the parameter value which is set and queried from the host thread. This value is then assigned to current gain at the start of the audio processing callback and it is current gain that is then applied to the signal. FMOD Gain shows how this method can be used to perform parameter ramping by not directly assigning current gain but interpolating between current gain and target gain over a fixed number of samples so as to minimize audio artefacts during parameter changes.</p>
<h2 id="plug-in-parameters"><a href="#plug-in-parameters">18.6 Plug-in Parameters</a></h2>
<p>Plug-in effect and sound modules can have any number of parameters. Once defined, the number of parameters and each of their properties cannot change. Parameters can be one of four types:</p>
<ul>
<li>floating-point</li>
<li>integer</li>
<li>boolean (two-state)</li>
<li>data</li>
</ul>
<p>Parameters are defined in <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_description">FMOD_DSP_DESCRIPTION</a> as a list of pointers to parameter descriptors, <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_description_paramdesc">FMOD_DSP_DESCRIPTION::paramdesc</a>. The <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_description_numparameters">FMOD_DSP_DESCRIPTION::numparameters</a> specifies the number of parameters. Each parameter descriptor is of type <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_parameter_desc">FMOD_DSP_PARAMETER_DESC</a>. As with the plug-in descriptor, parameter descriptors must stay around until the plug-in is unloaded as the data within these descriptors are directly accessed throughout the lifetime of the plug-in.</p>
<p>Common to each parameter type are the members <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_parameter_desc_name">FMOD_DSP_PARAMETER_DESC::name</a> and <code>units</code>, as well as <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_parameter_desc_description">FMOD_DSP_PARAMETER_DESC::description</a> which should describe the parameter in a sentence or two. The type member will need to be set to one of the four types and either of the <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_parameter_desc_floatdesc">FMOD_DSP_PARAMETER_DESC::floatdesc</a>, <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_parameter_desc_intdesc">FMOD_DSP_PARAMETER_DESC::intdesc</a>, <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_parameter_desc_booldesc">FMOD_DSP_PARAMETER_DESC::booldesc</a> or <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_parameter_desc_datadesc">FMOD_DSP_PARAMETER_DESC::datadesc</a> members will need to specified. The different parameter types and their properties are described in more detail in the sections below.</p>
<h3 id="floating-point-parameters"><a href="#floating-point-parameters">18.6.1 Floating-point Parameters</a></h3>
<p>Floating-point parameters have type set to <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_parameter_type_float">FMOD_DSP_PARAMETER_TYPE_FLOAT</a>. They are continuous, singled-valued parameters and their minimum, maximum and default values are defined by the floatdesc members min, max and defaultval.</p>
<p>The following units should be used where appropriate:</p>
<ul>
<li>"Hz" for frequency or cut-off</li>
<li>"ms" for duration, time offset or delay</li>
<li>"st" (semitones) for pitch</li>
<li>"dB" for gain, threshold or feedback</li>
<li>"%" for mix, depth, feedback, quality, probability, multiplier or generic 'amount'.</li>
<li>"Deg" for angle or angular spread</li>
</ul>
<p>These are preferred over other denominations (such as kHz for cut-off) as they are recognised by Studio therefore allowing values to be displayed in a more readable and consistent manner. Unitless 0-to-1 parameters should be avoided in favour of dB if the parameter describes a gain, % if it describes a multiplier, or a unitless 0-to-10 range is preferred if describing a generic amount.</p>
<p>The <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_description">FMOD_DSP_DESCRIPTION</a> members <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_description_setparameterfloat">FMOD_DSP_DESCRIPTION::setparameterfloat</a> and <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_description_getparameterfloat">FMOD_DSP_DESCRIPTION::getparameterfloat</a> will need to point to static functions of type <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_setparam_float_callback">FMOD_DSP_SETPARAM_FLOAT_CALLBACK</a> and <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_getparam_float_callback">FMOD_DSP_GETPARAM_FLOAT_CALLBACK</a>, respectively, if any floating-point parameters are declared.</p>
<p>These will be displayed as dials in FMOD Studio's effect deck.</p>
<h3 id="integer-parameters"><a href="#integer-parameters">18.6.2 Integer Parameters</a></h3>
<p>Integer parameters have type set to <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_parameter_type_int">FMOD_DSP_PARAMETER_TYPE_INT</a>. They are discrete, singled-valued parameters and their minimum, maximum and default values are defined by the intdesc members min, max and defaultval. The member goestoinf describes whether the maximum value represents infinity as maybe used for parameters representing polyphony, count or ratio.</p>
<p>The <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_description">FMOD_DSP_DESCRIPTION</a> members <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_description_setparameterint">FMOD_DSP_DESCRIPTION::setparameterint</a> and <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_description_getparameterint">FMOD_DSP_DESCRIPTION::getparameterint</a> will need to point to static functions of type <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_setparam_int_callback">FMOD_DSP_SETPARAM_INT_CALLBACK</a> and <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_getparam_int_callback">FMOD_DSP_GETPARAM_INT_CALLBACK</a>, respectively, if any integer parameters are declared.</p>
<p>These will be displayed as dials in FMOD Studio's effect deck.</p>
<h3 id="boolean-parameters"><a href="#boolean-parameters">18.6.3 Boolean Parameters</a></h3>
<p>Boolean parameters have type set to <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_parameter_type_bool">FMOD_DSP_PARAMETER_TYPE_BOOL</a>. They are discrete, singled-valued parameters and their default value is defined by the booldesc member defaultval.</p>
<p>The <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_description">FMOD_DSP_DESCRIPTION</a> members <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_description_setparameterbool">FMOD_DSP_DESCRIPTION::setparameterbool</a> and <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_description_getparameterbool">FMOD_DSP_DESCRIPTION::getparameterbool</a> will need to point to static functions of type <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_setparam_bool_callback">FMOD_DSP_SETPARAM_BOOL_CALLBACK</a> and <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_getparam_bool_callback">FMOD_DSP_GETPARAM_BOOL_CALLBACK</a>, respectively, if any boolean parameters are declared.</p>
<p>These will be displayed as buttons in FMOD Studio's effect deck.</p>
<h3 id="data-parameters"><a href="#data-parameters">18.6.4 Data Parameters</a></h3>
<p>Data parameters have type set to <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_parameter_type_data">FMOD_DSP_PARAMETER_TYPE_DATA</a>. These parameters can represent any type of data including built-in types which serve a special purpose in FMOD. The datadesc member datatype specifies the type of data stored in the parameter. Values 0 and above may be used to describe user types whereas negative values are reserved for special types described in the following sections.</p>
<p>The <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_description">FMOD_DSP_DESCRIPTION</a> members <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_description_setparameterdata">FMOD_DSP_DESCRIPTION::setparameterdata</a> and <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_description_getparameterdata">FMOD_DSP_DESCRIPTION::getparameterdata</a> will need to point to static functions of type <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_setparam_data_callback">FMOD_DSP_SETPARAM_DATA_CALLBACK</a> and <a class="apilink" href="plugin-api-dsp.html#fmod_dsp_getparam_data_callback">FMOD_DSP_GETPARAM_DATA_CALLBACK</a>, respectively, if any data parameters with datatype 0 and above are declared.</p>
<p>Data parameters with datatype 0 and above will be displayed as drop-zones in FMOD Studio's effect deck. You can drag any file containing the data onto the drop-zone to set the parameter's value. Data is stored with the project just like other parameter types.</p>
<h2 id="multiple-plug-ins-within-one-file"><a href="#multiple-plug-ins-within-one-file">18.7 Multiple Plug-ins Within One File</a></h2>
<p>Typically each plug-in only has a single definition. If you want to have multiple definitions from within the one plugin file, you can use a plugin list. An example is shown below.</p>
<div class="highlight language-text"><pre><span></span>FMOD_DSP_DESCRIPTION My_Gain_Desc = { .. };
FMOD_DSP_DESCRIPTION My_Panner_Desc = { .. };
FMOD_OUTPUT_DESCRIPTION My_Output_Desc = { .. };
static FMOD_PLUGINLIST My_Plugin_List[] =
{
{ FMOD_PLUGINTYPE_DSP, &amp;My_Gain_Desc },
{ FMOD_PLUGINTYPE_DSP, &amp;My_Panner_Desc },
{ FMOD_PLUGINTYPE_OUTPUT, &amp;My_Output_Desc },
{ FMOD_PLUGINTYPE_MAX, NULL }
};
extern &quot;C&quot;
{
F_EXPORT FMOD_PLUGINLIST* F_CALL FMODGetPluginDescriptionList()
{
return &amp;My_Plugin_List;
}
} // end extern &quot;C&quot;
</pre></div>
<p>Support for multiple plug-ins via <code>FMODGetPluginDescriptionList</code> was added in 1.08. If the plug-in also implements <code>FMODGetDSPDescription</code>, then older versions of the FMOD Engine load a single <a href="glossary.html#dsp-effect">DSP effect</a>, whereas newer versions load all effects.</p>
<p>To load plug-ins at runtime, call <a class="apilink" href="core-api-system.html#system_loadplugin">System::loadPlugin</a> as normal. The handle returned is for the first definition. <a class="apilink" href="core-api-system.html#system_getnumnestedplugins">System::getNumNestedPlugins</a> and <a class="apilink" href="core-api-system.html#system_getnestedplugin">System::getNestedPlugin</a> can be used to iterate all plug-ins in the one file.</p>
<div class="highlight language-text"><pre><span></span>unsigned int baseHandle;
ERRCHECK(system-&gt;loadPlugin(&quot;plugin_name.dll&quot;, &amp;baseHandle));
int count;
ERRCHECK(system-&gt;getNumNestedPlugins(baseHandle, &amp;count));
for (int index=0; index&lt;count; ++index)
{
unsigned int handle;
ERRCHECK(system-&gt;getNestedPlugin(baseHandle, index, &amp;handle));
FMOD_PLUGINTYPE type;
ERRCHECK(system-&gt;getPluginInfo(handle, &amp;type, 0, 0, 0));
// We have an output plug-in, a DSP plug-in, or a codec plug-in here.
}
</pre></div>
<p>The above code also works for plug-ins with a single definition. In that case, the count is always 1 and <a class="apilink" href="core-api-system.html#system_getnestedplugin">System::getNestedPlugin</a> returns the same handle as passed in.</p></div>
<p class="manual-footer">FMOD Engine User Manual 2.03.13 (2026-03-31). &copy; 2026 Firelight Technologies Pty Ltd.</p>
</div>
</body>
</html>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,720 @@
<html>
<head>
<title>FSBank API Reference</title>
<link rel="stylesheet" href="style/docs.css">
<link rel="stylesheet" href="style/code_highlight.css">
<script type="text/javascript" src="scripts/language-selector.js"></script></head>
<body>
<div class="docs-body">
<div class="manual-toc">
<p>FMOD Engine User Manual 2.03</p>
<ul>
<li><a href="welcome.html">Welcome to the FMOD Engine</a></li>
<li><a href="core-api-concepts.html">Core API Key Concepts</a></li>
<li><a href="running-the-core-api.html">Core API Getting Started</a></li>
<li><a href="loading-and-playing-sounds-in-the-core-api.html">Core API Loading and Playing Sounds</a></li>
<li><a href="spatializing-sounds-in-the-core-api.html">Core API Spatializing Sounds</a></li>
<li><a href="mixing-and-routing-in-the-core-api.html">Core API Mixing and Routing</a></li>
<li><a href="using-dsp-effects-in-the-core-api.html">Core API Using DSP Effects</a></li>
<li><a href="effects-reference.html">Core API Effect Reference</a></li>
<li><a href="managing-resources-in-the-core-api.html">Core API Managing Resources</a></li>
<li><a href="advanced-core-api-topics.html">Core API Advanced Topics</a></li>
<li><a href="core-api.html">Core API Reference</a></li>
<li><a href="studio-api-getting-started.html">Studio API Getting Started</a></li>
<li><a href="studio-guide.html">Studio API Guide</a></li>
<li><a href="studio-api-3d-events.html">Studio API 3D Events</a></li>
<li><a href="studio-api-threads.html">Studio API Threads</a></li>
<li><a href="studio-api.html">Studio API Reference</a></li>
<li><a href="platforms.html">Platform Details</a></li>
<li><a href="dsp-plugin-api-guide.html">Plug-in DSP API Guide</a></li>
<li><a href="plugin-api.html">Plug-in API Reference</a></li>
<li class="manual-current-chapter manual-active-chapter"><a href="fsbank-api.html">FSBank API Reference</a><ul>
<li><a href="#fsbank_init">FSBank_Init</a></li>
<li><a href="#fsbank_build">FSBank_Build</a></li>
<li><a href="#fsbank_buildcancel">FSBank_BuildCancel</a></li>
<li><a href="#fsbank_release">FSBank_Release</a></li>
<li><a href="#fsbank_releaseprogressitem">FSBank_ReleaseProgressItem</a></li>
<li><a href="#fsbank_memorygetstats">FSBank_MemoryGetStats</a></li>
<li><a href="#fsbank_memoryinit">FSBank_MemoryInit</a></li>
<li><a href="#fsbank_fetchfsbmemory">FSBank_FetchFSBMemory</a></li>
<li><a href="#fsbank_fetchnextprogressitem">FSBank_FetchNextProgressItem</a></li>
<li><a href="#fsbank_memory_alloc_callback">FSBANK_MEMORY_ALLOC_CALLBACK</a></li>
<li><a href="#fsbank_memory_free_callback">FSBANK_MEMORY_FREE_CALLBACK</a></li>
<li><a href="#fsbank_memory_realloc_callback">FSBANK_MEMORY_REALLOC_CALLBACK</a></li>
<li><a href="#fsbank_initflags">FSBANK_INITFLAGS</a></li>
<li><a href="#fsbank_buildflags">FSBANK_BUILDFLAGS</a></li>
<li><a href="#fsbank_format">FSBANK_FORMAT</a></li>
<li><a href="#fsbank_fsbversion">FSBANK_FSBVERSION</a></li>
<li><a href="#fsbank_progressitem">FSBANK_PROGRESSITEM</a></li>
<li><a href="#fsbank_result">FSBANK_RESULT</a></li>
<li><a href="#fsbank_state">FSBANK_STATE</a></li>
<li><a href="#fsbank_statedata_failed">FSBANK_STATEDATA_FAILED</a></li>
<li><a href="#fsbank_statedata_warning">FSBANK_STATEDATA_WARNING</a></li>
<li><a href="#fsbank_subsound">FSBANK_SUBSOUND</a></li>
</ul>
</li>
<li><a href="troubleshooting.html">Troubleshooting</a></li>
<li><a href="glossary.html">Glossary</a></li>
</ul>
</div>
<div class="manual-content api">
<h1>20. FSBank API Reference</h1>
<ul>
<li><span><a class="apilink" href="fsbank-api.html#fsbank_init" title="Initialize the FSBank system.">FSBank_Init</a> Initialize the FSBank system.</span></li>
<li><span><a class="apilink" href="fsbank-api.html#fsbank_build" title="Begin the building process for the provided subsound descriptions.">FSBank_Build</a> Begin the building process for the provided subsound descriptions.</span></li>
<li><span><a class="apilink" href="fsbank-api.html#fsbank_buildcancel" title="Halt the build in progress.">FSBank_BuildCancel</a> Halt the build in progress.</span></li>
<li><span><a class="apilink" href="fsbank-api.html#fsbank_release" title="Release the FSBank system, clean up used resources.">FSBank_Release</a> Release the FSBank system, clean up used resources.</span></li>
<li><span><a class="apilink" href="fsbank-api.html#fsbank_releaseprogressitem" title="Release memory associated with a progress item.">FSBank_ReleaseProgressItem</a> Release memory associated with a progress item.</span></li>
<li><span><a class="apilink" href="fsbank-api.html#fsbank_memorygetstats" title="Query the current and maximum memory usage of the FSBank system.">FSBank_MemoryGetStats</a> Query the current and maximum memory usage of the FSBank system.</span></li>
<li><span><a class="apilink" href="fsbank-api.html#fsbank_memoryinit" title="Specifies a method for FSBank to allocate memory through callbacks.">FSBank_MemoryInit</a> Specifies a method for FSBank to allocate memory through callbacks.</span></li>
<li><span><a class="apilink" href="fsbank-api.html#fsbank_fetchfsbmemory" title="Fetch the built FSB data from memory.">FSBank_FetchFSBMemory</a> Fetch the built FSB data from memory.</span></li>
<li><span><a class="apilink" href="fsbank-api.html#fsbank_fetchnextprogressitem" title="Fetch build progress items that describe the current state of the build.">FSBank_FetchNextProgressItem</a> Fetch build progress items that describe the current state of the build.</span></li>
<li><span><a class="apilink" href="fsbank-api.html#fsbank_memory_alloc_callback" title="Callback to allocate a block of memory.">FSBANK_MEMORY_ALLOC_CALLBACK</a> Callback to allocate a block of memory.</span></li>
<li><span><a class="apilink" href="fsbank-api.html#fsbank_memory_free_callback" title="Callback to free a block of memory.">FSBANK_MEMORY_FREE_CALLBACK</a> Callback to free a block of memory.</span></li>
<li><span><a class="apilink" href="fsbank-api.html#fsbank_memory_realloc_callback" title="Callback to re-allocate a block of memory to a different size.">FSBANK_MEMORY_REALLOC_CALLBACK</a> Callback to re-allocate a block of memory to a different size.</span></li>
<li><span><a class="apilink" href="fsbank-api.html#fsbank_initflags" title="Bit fields to control the general operation of the library.">FSBANK_INITFLAGS</a> Bit fields to control the general operation of the library.</span></li>
<li><span><a class="apilink" href="fsbank-api.html#fsbank_buildflags" title="Bit fields to control how subsounds are encoded.">FSBANK_BUILDFLAGS</a> Bit fields to control how subsounds are encoded.</span></li>
<li><span><a class="apilink" href="fsbank-api.html#fsbank_format" title="Compression formats available for encoding">FSBANK_FORMAT</a> Compression formats available for encoding</span></li>
<li><span><a class="apilink" href="fsbank-api.html#fsbank_fsbversion" title="Version of FSB to write out.">FSBANK_FSBVERSION</a> Version of FSB to write out.</span></li>
<li><span><a class="apilink" href="fsbank-api.html#fsbank_progressitem" title="Status information describing the progress of a build.">FSBANK_PROGRESSITEM</a> Status information describing the progress of a build.</span></li>
<li><span><a class="apilink" href="fsbank-api.html#fsbank_result" title="Error codes returned from every function.">FSBANK_RESULT</a> Error codes returned from every function.</span></li>
<li><span><a class="apilink" href="fsbank-api.html#fsbank_state" title="Current state during the build process.">FSBANK_STATE</a> Current state during the build process.</span></li>
<li><span><a class="apilink" href="fsbank-api.html#fsbank_statedata_failed" title="Extra failed state data.">FSBANK_STATEDATA_FAILED</a> Extra failed state data.</span></li>
<li><span><a class="apilink" href="fsbank-api.html#fsbank_statedata_warning" title="Extra warning state data.">FSBANK_STATEDATA_WARNING</a> Extra warning state data.</span></li>
<li><span><a class="apilink" href="fsbank-api.html#fsbank_subsound" title="Representation of how to encode a single subsound in the final FSB.">FSBANK_SUBSOUND</a> Representation of how to encode a single subsound in the final FSB.</span></li>
</ul>
<h2 api="function" id="fsbank_init"><a href="#fsbank_init">20.1 FSBank_Init</a></h2>
<p>Initialize the FSBank system.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
</div>
</p>
<div class="highlight language-c"><pre><span></span><span class="n">FSBANK_RESULT</span> <span class="nf">FSBank_Init</span><span class="p">(</span>
<span class="n">FSBANK_FSBVERSION</span> <span class="n">version</span><span class="p">,</span>
<span class="n">FSBANK_INITFLAGS</span> <span class="n">flags</span><span class="p">,</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">numSimultaneousJobs</span><span class="p">,</span>
<span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">cacheDirectory</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>version</dt>
<dd>FSB version, currently only <a class="apilink" href="fsbank-api.html#fsbank_fsbversion_fsb5">FSBANK_FSBVERSION_FSB5</a> is supported. (<a class="apilink" href="fsbank-api.html#fsbank_fsbversion">FSBANK_FSBVERSION</a>)</dd>
<dt>flags</dt>
<dd>Initialization flags which control how the system behaves. (<a class="apilink" href="fsbank-api.html#fsbank_initflags">FSBANK_INITFLAGS</a>)</dd>
<dt>numSimultaneousJobs</dt>
<dd>The maximum number of threads to create for parallel encoding. Set this to your number of CPU 'cores' for best performance.</dd>
<dt>cacheDirectory <span><a class="token" href="glossary.html#documentation-conventions" title="Optional">Opt</a></span></dt>
<dd>Location to store the temporary cache files, default is a directory off the current working directory.</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="fsbank-api.html#fsbank_release">FSBank_Release</a></p>
<h2 api="function" id="fsbank_build"><a href="#fsbank_build">20.2 FSBank_Build</a></h2>
<p>Begin the building process for the provided subsound descriptions.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
</div>
</p>
<div class="highlight language-c"><pre><span></span><span class="n">FSBANK_RESULT</span> <span class="nf">FSBank_Build</span><span class="p">(</span>
<span class="k">const</span> <span class="n">FSBANK_SUBSOUND</span> <span class="o">*</span><span class="n">subSounds</span><span class="p">,</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">numSubSounds</span><span class="p">,</span>
<span class="n">FSBANK_FORMAT</span> <span class="n">encodeFormat</span><span class="p">,</span>
<span class="n">FSBANK_BUILDFLAGS</span> <span class="n">buildFlags</span><span class="p">,</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">quality</span><span class="p">,</span>
<span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">encryptKey</span><span class="p">,</span>
<span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">outputFileName</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>subSounds</dt>
<dd>Array of subsound descriptions each defining one subsound for the <a href="glossary.html#fsb">FSB</a>. (<a class="apilink" href="fsbank-api.html#fsbank_subsound">FSBANK_SUBSOUND</a>)</dd>
<dt>numSubSounds</dt>
<dd>Number of elements in <code>subSounds</code>.</dd>
<dt>encodeFormat</dt>
<dd>FSB encoding format. (<a class="apilink" href="fsbank-api.html#fsbank_format">FSBANK_FORMAT</a>)</dd>
<dt>buildFlags</dt>
<dd>Building flags which control how the sample data is encoded. (<a class="apilink" href="fsbank-api.html#fsbank_buildflags">FSBANK_BUILDFLAGS</a>)</dd>
<dt>quality</dt>
<dd>Controls the post compression quality level. From 1 (high compression / low quality) to 100 (high quality / low compression), use 0 for default quality. See remarks for format specific usage.</dd>
<dt>encryptKey <span><a class="token" href="glossary.html#documentation-conventions" title="Optional">Opt</a></span></dt>
<dd>Key used to encrypt the FSB. Same key is required at runtime for decryption.</dd>
<dt>outputFileName <span><a class="token" href="glossary.html#documentation-conventions" title="Output">Out</a></span></dt>
<dd>Path of the FSB to produce.</dd>
</dl>
<p>Format specific quality interpretation:</p>
<ul>
<li><strong>AT9</strong> - Bitrate (Kbps) depends on channel count, quality [1 to 100] maps linearly to the available options</li>
<li>1ch = [36, 48, 60, 72, 84, 96]</li>
<li>2ch = [72, 96, 120, 144, 168, 192]</li>
<li><strong>MPEG</strong> - Bitrate (Kbps) = FMOD quality * 3.2</li>
<li><strong>Vorbis</strong> - Vorbis quality [-0.1 to 1.0] maps linearly to FMOD quality [1 to 100] based on: <code>Vorbis_Quality = ((FMOD_Quality - 1) / 90.0f) - 0.1f</code></li>
<li><strong>XMA</strong> - XMA quality = FMOD quality</li>
<li><strong>Opus</strong> - Opus per-channel bitrate (Kbps) [0.8 to 64] maps linearly to FMOD quality [1 to 80], then bitrate [67.2 to 128] to quality [81 to 100]</li>
</ul>
<p>Build function will block until complete.</p>
<h2 api="function" id="fsbank_buildcancel"><a href="#fsbank_buildcancel">20.3 FSBank_BuildCancel</a></h2>
<p>Halt the build in progress.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
</div>
</p>
<div class="highlight language-c"><pre><span></span><span class="n">FSBANK_RESULT</span> <span class="nf">FSBank_BuildCancel</span><span class="p">();</span>
</pre></div>
<p>Must be called from a different thread to <a class="apilink" href="fsbank-api.html#fsbank_build">FSBank_Build</a></p>
<p><strong>See Also:</strong> <a class="apilink" href="fsbank-api.html#fsbank_build">FSBank_Build</a></p>
<h2 api="function" id="fsbank_release"><a href="#fsbank_release">20.4 FSBank_Release</a></h2>
<p>Release the FSBank system, clean up used resources.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
</div>
</p>
<div class="highlight language-c"><pre><span></span><span class="n">FSBANK_RESULT</span> <span class="nf">FSBank_Release</span><span class="p">();</span>
</pre></div>
<p>All progress items retrieved with <a class="apilink" href="fsbank-api.html#fsbank_fetchnextprogressitem">FSBank_FetchNextProgressItem</a> will be released by this function.</p>
<p><strong>See Also:</strong> <a class="apilink" href="fsbank-api.html#fsbank_init">FSBank_Init</a>, <a class="apilink" href="fsbank-api.html#fsbank_fetchnextprogressitem">FSBank_FetchNextProgressItem</a></p>
<h2 api="function" id="fsbank_releaseprogressitem"><a href="#fsbank_releaseprogressitem">20.5 FSBank_ReleaseProgressItem</a></h2>
<p>Release memory associated with a progress item.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
</div>
</p>
<div class="highlight language-c"><pre><span></span><span class="n">FSBANK_RESULT</span> <span class="nf">FSBank_ReleaseProgressItem</span><span class="p">(</span>
<span class="k">const</span> <span class="n">FSBANK_PROGRESSITEM</span> <span class="o">*</span><span class="n">progressItem</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>progressItem</dt>
<dd>One status update about the progress of a particular subsound. (<a class="apilink" href="fsbank-api.html#fsbank_progressitem">FSBANK_PROGRESSITEM</a>)</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="fsbank-api.html#fsbank_fetchnextprogressitem">FSBank_FetchNextProgressItem</a></p>
<h2 api="function" id="fsbank_memorygetstats"><a href="#fsbank_memorygetstats">20.6 FSBank_MemoryGetStats</a></h2>
<p>Query the current and maximum memory usage of the FSBank system.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
</div>
</p>
<div class="highlight language-c"><pre><span></span><span class="n">FSBANK_RESULT</span> <span class="nf">FSBank_MemoryGetStats</span><span class="p">(</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="o">*</span><span class="n">currentAllocated</span><span class="p">,</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="o">*</span><span class="n">maximumAllocated</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>currentAllocated</dt>
<dd>Address of a variable that receives the currently allocated memory at time of call. Optional. Specify 0 or NULL to ignore.</dd>
<dt>maximumAllocated</dt>
<dd>Address of a variable that receives the maximum allocated memory since <a class="apilink" href="fsbank-api.html#fsbank_init">FSBank_Init</a>. Optional. Specify 0 or NULL to ignore.</dd>
</dl>
<h2 api="function" id="fsbank_memoryinit"><a href="#fsbank_memoryinit">20.7 FSBank_MemoryInit</a></h2>
<p>Specifies a method for FSBank to allocate memory through callbacks.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
</div>
</p>
<div class="highlight language-c"><pre><span></span><span class="n">FSBANK_RESULT</span> <span class="nf">FSBank_MemoryInit</span><span class="p">(</span>
<span class="n">FSBANK_MEMORY_ALLOC_CALLBACK</span> <span class="n">userAlloc</span><span class="p">,</span>
<span class="n">FSBANK_MEMORY_REALLOC_CALLBACK</span> <span class="n">userRealloc</span><span class="p">,</span>
<span class="n">FSBANK_MEMORY_FREE_CALLBACK</span> <span class="n">userFree</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>userAlloc</dt>
<dd>Overrides the internal calls to alloc. Compatible with ANSI malloc(). (<a class="apilink" href="fsbank-api.html#fsbank_memory_alloc_callback">FSBANK_MEMORY_ALLOC_CALLBACK</a>)</dd>
<dt>userRealloc</dt>
<dd>Overrides the internal calls to realloc. Compatible with ANSI realloc(). (<a class="apilink" href="fsbank-api.html#fsbank_memory_realloc_callback">FSBANK_MEMORY_REALLOC_CALLBACK</a>)</dd>
<dt>userFree</dt>
<dd>Overrides the internal calls to free. Compatible with ANSI free(). (<a class="apilink" href="fsbank-api.html#fsbank_memory_free_callback">FSBANK_MEMORY_FREE_CALLBACK</a>)</dd>
</dl>
<h2 api="function" id="fsbank_fetchfsbmemory"><a href="#fsbank_fetchfsbmemory">20.8 FSBank_FetchFSBMemory</a></h2>
<p>Fetch the built FSB data from memory.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
</div>
</p>
<div class="highlight language-c"><pre><span></span><span class="n">FSBANK_RESULT</span> <span class="nf">FSBank_FetchFSBMemory</span><span class="p">(</span>
<span class="k">const</span> <span class="kt">void</span> <span class="o">**</span><span class="n">data</span><span class="p">,</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="o">*</span><span class="n">length</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>data</dt>
<dd>Built FSB data.</dd>
<dt>length</dt>
<dd>
<p>Length of 'data'.</p>
<ul>
<li><span class="label">Units:</span> Bytes</li>
</ul>
</dd>
</dl>
<p>Requires <a class="apilink" href="fsbank-api.html#fsbank_build">FSBank_Build</a> to be called with outputFileName is set to NULL.</p>
<p>The memory allocated as part of <a class="apilink" href="fsbank-api.html#fsbank_build">FSBank_Build</a> will be freed automatically by the next <a class="apilink" href="fsbank-api.html#fsbank_build">FSBank_Build</a> or <a class="apilink" href="fsbank-api.html#fsbank_release">FSBank_Release</a>.</p>
<p><strong>See Also:</strong> <a class="apilink" href="fsbank-api.html#fsbank_build">FSBank_Build</a>, <a class="apilink" href="fsbank-api.html#fsbank_release">FSBank_Release</a></p>
<h2 api="function" id="fsbank_fetchnextprogressitem"><a href="#fsbank_fetchnextprogressitem">20.9 FSBank_FetchNextProgressItem</a></h2>
<p>Fetch build progress items that describe the current state of the build.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
</div>
</p>
<div class="highlight language-c"><pre><span></span><span class="n">FSBANK_RESULT</span> <span class="nf">FSBank_FetchNextProgressItem</span><span class="p">(</span>
<span class="k">const</span> <span class="n">FSBANK_PROGRESSITEM</span> <span class="o">**</span><span class="n">progressItem</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>progressItem</dt>
<dd>One status update about the progress of a particular subsound. (<a class="apilink" href="fsbank-api.html#fsbank_progressitem">FSBANK_PROGRESSITEM</a>)</dd>
</dl>
<p>Can be called while the build is in progress to get realtime updates or after the build for a report. Call <a class="apilink" href="fsbank-api.html#fsbank_releaseprogressitem">FSBank_ReleaseProgressItem</a> to free allocated memory.</p>
<h2 api="callback" id="fsbank_memory_alloc_callback"><a href="#fsbank_memory_alloc_callback">20.10 FSBANK_MEMORY_ALLOC_CALLBACK</a></h2>
<p>Callback to allocate a block of memory.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
</div>
</p>
<div class="highlight language-c"><pre><span></span><span class="kt">void</span> <span class="o">*</span> <span class="n">FSBANK_CALLBACK</span> <span class="nf">FSBANK_MEMORY_ALLOC_CALLBACK</span><span class="p">(</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">size</span><span class="p">,</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">type</span><span class="p">,</span>
<span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">sourceStr</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>size</dt>
<dd>Size in bytes of the memory block to be allocated and returned.</dd>
<dt>type</dt>
<dd>Type of memory allocation.</dd>
<dt>sourceStr</dt>
<dd>Only valid (not null) in logging versions of FMOD. Gives a string with the fmod source code filename and line number in it, for better resource tracking.</dd>
</dl>
<p>Returning an aligned pointer, of 16 byte alignment is recommended for speed purposes.</p>
<p><strong>See Also:</strong> <a class="apilink" href="fsbank-api.html#fsbank_memoryinit">FSBank_MemoryInit</a>, <a class="apilink" href="fsbank-api.html#fsbank_memory_realloc_callback">FSBANK_MEMORY_REALLOC_CALLBACK</a>, <a class="apilink" href="fsbank-api.html#fsbank_memory_free_callback">FSBANK_MEMORY_FREE_CALLBACK</a></p>
<h2 api="callback" id="fsbank_memory_free_callback"><a href="#fsbank_memory_free_callback">20.11 FSBANK_MEMORY_FREE_CALLBACK</a></h2>
<p>Callback to free a block of memory.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
</div>
</p>
<div class="highlight language-c"><pre><span></span><span class="kt">void</span> <span class="n">FSBANK_CALLBACK</span> <span class="nf">FSBANK_MEMORY_FREE_CALLBACK</span><span class="p">(</span>
<span class="kt">void</span> <span class="o">*</span><span class="n">ptr</span><span class="p">,</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">type</span><span class="p">,</span>
<span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">sourceStr</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>ptr</dt>
<dd>Pointer to a pre-existing block of memory to be freed.</dd>
<dt>type</dt>
<dd>Type of memory to be freed.</dd>
<dt>sourceStr</dt>
<dd>Only valid (not null) in logging versions of FMOD. Gives a string with the fmod source code filename and line number in it, for better resource tracking.</dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="fsbank-api.html#fsbank_memoryinit">FSBank_MemoryInit</a>, <a class="apilink" href="fsbank-api.html#fsbank_memory_alloc_callback">FSBANK_MEMORY_ALLOC_CALLBACK</a>, <a class="apilink" href="fsbank-api.html#fsbank_memory_realloc_callback">FSBANK_MEMORY_REALLOC_CALLBACK</a></p>
<h2 api="callback" id="fsbank_memory_realloc_callback"><a href="#fsbank_memory_realloc_callback">20.12 FSBANK_MEMORY_REALLOC_CALLBACK</a></h2>
<p>Callback to re-allocate a block of memory to a different size.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
</div>
</p>
<div class="highlight language-c"><pre><span></span><span class="kt">void</span> <span class="o">*</span> <span class="n">FSBANK_CALLBACK</span> <span class="nf">FSBANK_MEMORY_REALLOC_CALLBACK</span><span class="p">(</span>
<span class="kt">void</span> <span class="o">*</span><span class="n">ptr</span><span class="p">,</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">size</span><span class="p">,</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">type</span><span class="p">,</span>
<span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">sourceStr</span>
<span class="p">);</span>
</pre></div>
<dl>
<dt>ptr</dt>
<dd>Pointer to a block of memory to be resized. If this is NULL then a new block of memory is simply allocated.</dd>
<dt>size</dt>
<dd>Size of the memory to be reallocated. The original memory must be preserved.</dd>
<dt>type</dt>
<dd>Type of memory allocation.</dd>
<dt>sourceStr</dt>
<dd>Only valid (not null) in logging versions of FMOD. Gives a string with the fmod source code filename and line number in it, for better resource tracking.</dd>
</dl>
<p>Returning an aligned pointer, of 16 byte alignment is recommended for speed purposes.</p>
<p><strong>See Also:</strong> <a class="apilink" href="fsbank-api.html#fsbank_memoryinit">FSBank_MemoryInit</a>, <a class="apilink" href="fsbank-api.html#fsbank_memory_alloc_callback">FSBANK_MEMORY_ALLOC_CALLBACK</a>, <a class="apilink" href="fsbank-api.html#fsbank_memory_free_callback">FSBANK_MEMORY_FREE_CALLBACK</a></p>
<h2 api="define" id="fsbank_initflags"><a href="#fsbank_initflags">20.13 FSBANK_INITFLAGS</a></h2>
<p>Bit fields to control the general operation of the library.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
</div>
</p>
<div class="highlight language-c"><pre><span></span><span class="cp">#define FSBANK_INIT_NORMAL 0x00000000</span>
<span class="cp">#define FSBANK_INIT_IGNOREERRORS 0x00000001</span>
<span class="cp">#define FSBANK_INIT_WARNINGSASERRORS 0x00000002</span>
<span class="cp">#define FSBANK_INIT_CREATEINCLUDEHEADER 0x00000004</span>
<span class="cp">#define FSBANK_INIT_DONTLOADCACHEFILES 0x00000008</span>
<span class="cp">#define FSBANK_INIT_GENERATEPROGRESSITEMS 0x00000010</span>
</pre></div>
<dl>
<dt id="fsbank_init_normal">FSBANK_INIT_NORMAL</dt>
<dd>Initialize normally. </dd>
<dt id="fsbank_init_ignoreerrors">FSBANK_INIT_IGNOREERRORS</dt>
<dd>Ignore individual subsound build errors, continue building for as long as possible. </dd>
<dt id="fsbank_init_warningsaserrors">FSBANK_INIT_WARNINGSASERRORS</dt>
<dd>Treat any warnings issued as errors. </dd>
<dt id="fsbank_init_createincludeheader">FSBANK_INIT_CREATEINCLUDEHEADER</dt>
<dd>Create C header files with #defines defining indices for each member of the FSB. </dd>
<dt id="fsbank_init_dontloadcachefiles">FSBANK_INIT_DONTLOADCACHEFILES</dt>
<dd>Ignore existing cache files. </dd>
<dt id="fsbank_init_generateprogressitems">FSBANK_INIT_GENERATEPROGRESSITEMS</dt>
<dd>Generate status items that can be queried by another thread to monitor the build progress and give detailed error messages. </dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="fsbank-api.html#fsbank_init">FSBank_Init</a></p>
<h2 api="define" id="fsbank_buildflags"><a href="#fsbank_buildflags">20.14 FSBANK_BUILDFLAGS</a></h2>
<p>Bit fields to control how subsounds are encoded.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
</div>
</p>
<div class="highlight language-c"><pre><span></span><span class="cp">#define FSBANK_BUILD_DEFAULT 0x00000000</span>
<span class="cp">#define FSBANK_BUILD_DISABLESYNCPOINTS 0x00000001</span>
<span class="cp">#define FSBANK_BUILD_DONTLOOP 0x00000002</span>
<span class="cp">#define FSBANK_BUILD_FILTERHIGHFREQ 0x00000004</span>
<span class="cp">#define FSBANK_BUILD_DISABLESEEKING 0x00000008</span>
<span class="cp">#define FSBANK_BUILD_OPTIMIZESAMPLERATE 0x00000010</span>
<span class="cp">#define FSBANK_BUILD_FSB5_DONTWRITENAMES 0x00000080</span>
<span class="cp">#define FSBANK_BUILD_NOGUID 0x00000100</span>
<span class="cp">#define FSBANK_BUILD_WRITEPEAKVOLUME 0x00000200</span>
<span class="cp">#define FSBANK_BUILD_ALIGN4K 0x00000400</span>
<span class="cp">#define FSBANK_BUILD_OVERRIDE_MASK (FSBANK_BUILD_DISABLESYNCPOINTS | FSBANK_BUILD_DONTLOOP | FSBANK_BUILD_FILTERHIGHFREQ | FSBANK_BUILD_DISABLESEEKING | FSBANK_BUILD_OPTIMIZESAMPLERATE | FSBANK_BUILD_WRITEPEAKVOLUME)</span>
<span class="cp">#define FSBANK_BUILD_CACHE_VALIDATION_MASK (FSBANK_BUILD_DONTLOOP | FSBANK_BUILD_FILTERHIGHFREQ | FSBANK_BUILD_OPTIMIZESAMPLERATE)</span>
</pre></div>
<dl>
<dt id="fsbank_build_default">FSBANK_BUILD_DEFAULT</dt>
<dd>Build with default settings. </dd>
<dt id="fsbank_build_disablesyncpoints">FSBANK_BUILD_DISABLESYNCPOINTS</dt>
<dd>Disable the storing of syncpoints in the output </dd>
<dt id="fsbank_build_dontloop">FSBANK_BUILD_DONTLOOP</dt>
<dd>Disable perfect loop encoding and sound stretching. Removes chirps from the start of oneshot MP2, MP3 and IMAADPCM sounds. </dd>
<dt id="fsbank_build_filterhighfreq">FSBANK_BUILD_FILTERHIGHFREQ</dt>
<dd>XMA only. Enable high frequency filtering. </dd>
<dt id="fsbank_build_disableseeking">FSBANK_BUILD_DISABLESEEKING</dt>
<dd>XMA only. Disable seek tables to save memory. </dd>
<dt id="fsbank_build_optimizesamplerate">FSBANK_BUILD_OPTIMIZESAMPLERATE</dt>
<dd>Attempt to optimize the sample rate down. Ignored if format is MP2, MP3 or if FSB4 basic headers flag is used. </dd>
<dt id="fsbank_build_fsb5_dontwritenames">FSBANK_BUILD_FSB5_DONTWRITENAMES</dt>
<dd>Do not write out a names chunk to the FSB to reduce file size. </dd>
<dt id="fsbank_build_noguid">FSBANK_BUILD_NOGUID</dt>
<dd>Write out a null <a href="glossary.html#guid">GUID</a> for the FSB header. The engine will not use header caching for these FSB files. </dd>
<dt id="fsbank_build_writepeakvolume">FSBANK_BUILD_WRITEPEAKVOLUME</dt>
<dd>Write peak volume for all subsounds. </dd>
<dt id="fsbank_build_align4k">FSBANK_BUILD_ALIGN4K</dt>
<dd>Opus, Vorbis and FADPCM only. Align large sample data to a 4KB boundary to improve binary patching in distribution systems that operate in 4KB blocks (Microsoft).</dd>
<dt id="fsbank_build_override_mask">FSBANK_BUILD_OVERRIDE_MASK</dt>
<dd>Build flag mask that specifies which settings can be overridden per subsound. </dd>
<dt id="fsbank_build_cache_validation_mask">FSBANK_BUILD_CACHE_VALIDATION_MASK</dt>
<dd>Build flag mask that specifies which settings (when changed) invalidate a cache file. </dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="fsbank-api.html#fsbank_init">FSBank_Init</a>, <a class="apilink" href="fsbank-api.html#fsbank_subsound">FSBANK_SUBSOUND</a></p>
<h2 api="enum" id="fsbank_format"><a href="#fsbank_format">20.15 FSBANK_FORMAT</a></h2>
<p>Compression formats available for encoding</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
</div>
</p>
<div class="highlight language-c"><pre><span></span><span class="k">typedef</span> <span class="k">enum</span> <span class="n">FSBANK_FORMAT</span> <span class="p">{</span>
<span class="n">FSBANK_FORMAT_PCM</span><span class="p">,</span>
<span class="n">FSBANK_FORMAT_XMA</span><span class="p">,</span>
<span class="n">FSBANK_FORMAT_AT9</span><span class="p">,</span>
<span class="n">FSBANK_FORMAT_VORBIS</span><span class="p">,</span>
<span class="n">FSBANK_FORMAT_FADPCM</span><span class="p">,</span>
<span class="n">FSBANK_FORMAT_OPUS</span><span class="p">,</span>
<span class="n">FSBANK_FORMAT_MAX</span>
<span class="p">}</span> <span class="n">FSBANK_FORMAT</span><span class="p">;</span>
</pre></div>
<dl>
<dt id="fsbank_format_pcm">FSBANK_FORMAT_PCM</dt>
<dd>PCM (1:1) All platforms. </dd>
<dt id="fsbank_format_xma">FSBANK_FORMAT_XMA</dt>
<dd>XMA (VBR) XboxOne and Xbox Series X|S only (hardware). Depends on xmaencoder. </dd>
<dt id="fsbank_format_at9">FSBANK_FORMAT_AT9</dt>
<dd>ATRAC9 (CBR) PS4 and PS5 only (hardware). Depends on libatrac9. </dd>
<dt id="fsbank_format_vorbis">FSBANK_FORMAT_VORBIS</dt>
<dd>Vorbis (VBR) All platforms. Depends on libvorbis. </dd>
<dt id="fsbank_format_fadpcm">FSBANK_FORMAT_FADPCM</dt>
<dd>FMOD ADPCM (3.5:1) All platforms. </dd>
<dt id="fsbank_format_opus">FSBANK_FORMAT_OPUS</dt>
<dd>Opus (VBR) Xbox Series X|S, PS5, and Switch. Depends on opus.</dd>
<dt id="fsbank_format_max">FSBANK_FORMAT_MAX</dt>
<dd>Upper bound for this enumeration, for use with validation. </dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="fsbank-api.html#fsbank_build">FSBank_Build</a></p>
<h2 api="enum" id="fsbank_fsbversion"><a href="#fsbank_fsbversion">20.16 FSBANK_FSBVERSION</a></h2>
<p>Version of FSB to write out.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
</div>
</p>
<div class="highlight language-c"><pre><span></span><span class="k">typedef</span> <span class="k">enum</span> <span class="n">FSBANK_FSBVERSION</span> <span class="p">{</span>
<span class="n">FSBANK_FSBVERSION_FSB5</span><span class="p">,</span>
<span class="n">FSBANK_FSBVERSION_MAX</span>
<span class="p">}</span> <span class="n">FSBANK_FSBVERSION</span><span class="p">;</span>
</pre></div>
<dl>
<dt id="fsbank_fsbversion_fsb5">FSBANK_FSBVERSION_FSB5</dt>
<dd>Produce FSB version 5 files. </dd>
<dt id="fsbank_fsbversion_max">FSBANK_FSBVERSION_MAX</dt>
<dd>Upper bound for this enumeration, for use with validation. </dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="fsbank-api.html#fsbank_init">FSBank_Init</a></p>
<h2 api="struct" id="fsbank_progressitem"><a href="#fsbank_progressitem">20.17 FSBANK_PROGRESSITEM</a></h2>
<p>Status information describing the progress of a build.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
</div>
</p>
<div class="highlight language-c"><pre><span></span><span class="k">typedef</span> <span class="k">struct</span> <span class="n">FSBANK_PROGRESSITEM</span> <span class="p">{</span>
<span class="kt">int</span> <span class="n">subSoundIndex</span><span class="p">;</span>
<span class="kt">int</span> <span class="n">threadIndex</span><span class="p">;</span>
<span class="n">FSBANK_STATE</span> <span class="n">state</span><span class="p">;</span>
<span class="k">const</span> <span class="kt">void</span> <span class="o">*</span><span class="n">stateData</span><span class="p">;</span>
<span class="p">}</span> <span class="n">FSBANK_PROGRESSITEM</span><span class="p">;</span>
</pre></div>
<dl>
<dt id="fsbank_progressitem_subsoundindex">subSoundIndex</dt>
<dd>Index into the subsound list passed to <a class="apilink" href="fsbank-api.html#fsbank_build">FSBank_Build</a> that this update relates to (-1 indicates no specific subsound). </dd>
<dt id="fsbank_progressitem_threadindex">threadIndex</dt>
<dd>Which thread index is serving this update (-1 indicates <a class="apilink" href="fsbank-api.html#fsbank_build">FSBank_Build</a> / main thread). </dd>
<dt id="fsbank_progressitem_state">state</dt>
<dd>Progress through the encoding process. (<a class="apilink" href="fsbank-api.html#fsbank_state">FSBANK_STATE</a>)</dd>
<dt id="fsbank_progressitem_statedata">stateData</dt>
<dd>Cast to state specific data structure for extra information. </dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="fsbank-api.html#fsbank_build">FSBank_Build</a>, <a class="apilink" href="fsbank-api.html#fsbank_fetchnextprogressitem">FSBank_FetchNextProgressItem</a>, <a class="apilink" href="fsbank-api.html#fsbank_releaseprogressitem">FSBank_ReleaseProgressItem</a>, <a class="apilink" href="fsbank-api.html#fsbank_state">FSBANK_STATE</a></p>
<h2 api="enum" id="fsbank_result"><a href="#fsbank_result">20.18 FSBANK_RESULT</a></h2>
<p>Error codes returned from every function.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
</div>
</p>
<div class="highlight language-c"><pre><span></span><span class="k">typedef</span> <span class="k">enum</span> <span class="n">FSBANK_RESULT</span> <span class="p">{</span>
<span class="n">FSBANK_OK</span><span class="p">,</span>
<span class="n">FSBANK_ERR_CACHE_CHUNKNOTFOUND</span><span class="p">,</span>
<span class="n">FSBANK_ERR_CANCELLED</span><span class="p">,</span>
<span class="n">FSBANK_ERR_CANNOT_CONTINUE</span><span class="p">,</span>
<span class="n">FSBANK_ERR_ENCODER</span><span class="p">,</span>
<span class="n">FSBANK_ERR_ENCODER_INIT</span><span class="p">,</span>
<span class="n">FSBANK_ERR_ENCODER_NOTSUPPORTED</span><span class="p">,</span>
<span class="n">FSBANK_ERR_FILE_OS</span><span class="p">,</span>
<span class="n">FSBANK_ERR_FILE_NOTFOUND</span><span class="p">,</span>
<span class="n">FSBANK_ERR_FMOD</span><span class="p">,</span>
<span class="n">FSBANK_ERR_INITIALIZED</span><span class="p">,</span>
<span class="n">FSBANK_ERR_INVALID_FORMAT</span><span class="p">,</span>
<span class="n">FSBANK_ERR_INVALID_PARAM</span><span class="p">,</span>
<span class="n">FSBANK_ERR_MEMORY</span><span class="p">,</span>
<span class="n">FSBANK_ERR_UNINITIALIZED</span><span class="p">,</span>
<span class="n">FSBANK_ERR_WRITER_FORMAT</span><span class="p">,</span>
<span class="n">FSBANK_WARN_CANNOTLOOP</span><span class="p">,</span>
<span class="n">FSBANK_WARN_IGNORED_FILTERHIGHFREQ</span><span class="p">,</span>
<span class="n">FSBANK_WARN_IGNORED_DISABLESEEKING</span><span class="p">,</span>
<span class="n">FSBANK_WARN_FORCED_DONTWRITENAMES</span><span class="p">,</span>
<span class="n">FSBANK_ERR_ENCODER_FILE_NOTFOUND</span><span class="p">,</span>
<span class="n">FSBANK_ERR_ENCODER_FILE_BAD</span><span class="p">,</span>
<span class="n">FSBANK_WARN_IGNORED_ALIGN4K</span><span class="p">,</span>
<span class="p">}</span> <span class="n">FSBANK_RESULT</span><span class="p">;</span>
</pre></div>
<dl>
<dt id="fsbank_ok">FSBANK_OK</dt>
<dd>No errors. </dd>
<dt id="fsbank_err_cache_chunknotfound">FSBANK_ERR_CACHE_CHUNKNOTFOUND</dt>
<dd>An expected chunk is missing from the cache, perhaps try deleting cache files. </dd>
<dt id="fsbank_err_cancelled">FSBANK_ERR_CANCELLED</dt>
<dd>The build process was cancelled during compilation by the user. </dd>
<dt id="fsbank_err_cannot_continue">FSBANK_ERR_CANNOT_CONTINUE</dt>
<dd>The build process cannot continue due to previously ignored errors. </dd>
<dt id="fsbank_err_encoder">FSBANK_ERR_ENCODER</dt>
<dd>Encoder for chosen format has encountered an unexpected error. </dd>
<dt id="fsbank_err_encoder_init">FSBANK_ERR_ENCODER_INIT</dt>
<dd>Encoder initialization failed. </dd>
<dt id="fsbank_err_encoder_notsupported">FSBANK_ERR_ENCODER_NOTSUPPORTED</dt>
<dd>Encoder for chosen format is not supported on this platform. </dd>
<dt id="fsbank_err_file_os">FSBANK_ERR_FILE_OS</dt>
<dd>An operating system based file error was encountered. </dd>
<dt id="fsbank_err_file_notfound">FSBANK_ERR_FILE_NOTFOUND</dt>
<dd>A specified file could not be found. </dd>
<dt id="fsbank_err_fmod">FSBANK_ERR_FMOD</dt>
<dd>Internal error from FMOD sub-system. </dd>
<dt id="fsbank_err_initialized">FSBANK_ERR_INITIALIZED</dt>
<dd>Already initialized. </dd>
<dt id="fsbank_err_invalid_format">FSBANK_ERR_INVALID_FORMAT</dt>
<dd>The format of the source file is invalid. </dd>
<dt id="fsbank_err_invalid_param">FSBANK_ERR_INVALID_PARAM</dt>
<dd>An invalid parameter has been passed to this function. </dd>
<dt id="fsbank_err_memory">FSBANK_ERR_MEMORY</dt>
<dd>Ran out of memory. </dd>
<dt id="fsbank_err_uninitialized">FSBANK_ERR_UNINITIALIZED</dt>
<dd>Not initialized yet. </dd>
<dt id="fsbank_err_writer_format">FSBANK_ERR_WRITER_FORMAT</dt>
<dd>Chosen encode format is not supported by this FSB version. </dd>
<dt id="fsbank_warn_cannotloop">FSBANK_WARN_CANNOTLOOP</dt>
<dd>Source file is too short for seamless looping. Looping disabled. </dd>
<dt id="fsbank_warn_ignored_filterhighfreq">FSBANK_WARN_IGNORED_FILTERHIGHFREQ</dt>
<dd><a class="apilink" href="fsbank-api.html#fsbank_build_filterhighfreq">FSBANK_BUILD_FILTERHIGHFREQ</a> flag ignored: feature only supported by XMA format. </dd>
<dt id="fsbank_warn_ignored_disableseeking">FSBANK_WARN_IGNORED_DISABLESEEKING</dt>
<dd><a class="apilink" href="fsbank-api.html#fsbank_build_disableseeking">FSBANK_BUILD_DISABLESEEKING</a> flag ignored: feature only supported by XMA format. </dd>
<dt id="fsbank_warn_forced_dontwritenames">FSBANK_WARN_FORCED_DONTWRITENAMES</dt>
<dd><a class="apilink" href="fsbank-api.html#fsbank_build_fsb5_dontwritenames">FSBANK_BUILD_FSB5_DONTWRITENAMES</a> flag forced: cannot write names when source is from memory. </dd>
<dt id="fsbank_err_encoder_file_notfound">FSBANK_ERR_ENCODER_FILE_NOTFOUND</dt>
<dd>External encoder dynamic library not found </dd>
<dt id="fsbank_err_encoder_file_bad">FSBANK_ERR_ENCODER_FILE_BAD</dt>
<dd>External encoder dynamic library could not be loaded, possibly incorrect binary format, incorrect architecture, file corruption </dd>
<dt id="fsbank_warn_ignored_align4k">FSBANK_WARN_IGNORED_ALIGN4K</dt>
<dd><a class="apilink" href="fsbank-api.html#fsbank_build_align4k">FSBANK_BUILD_ALIGN4K</a> flag ignored: feature only supported by Opus, Vorbis, and FADPCM formats.</dd>
</dl>
<h2 api="enum" id="fsbank_state"><a href="#fsbank_state">20.19 FSBANK_STATE</a></h2>
<p>Current state during the build process.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
</div>
</p>
<div class="highlight language-c"><pre><span></span><span class="k">typedef</span> <span class="k">enum</span> <span class="n">FSBANK_STATE</span> <span class="p">{</span>
<span class="n">FSBANK_STATE_DECODING</span><span class="p">,</span>
<span class="n">FSBANK_STATE_ANALYSING</span><span class="p">,</span>
<span class="n">FSBANK_STATE_PREPROCESSING</span><span class="p">,</span>
<span class="n">FSBANK_STATE_ENCODING</span><span class="p">,</span>
<span class="n">FSBANK_STATE_WRITING</span><span class="p">,</span>
<span class="n">FSBANK_STATE_FINISHED</span><span class="p">,</span>
<span class="n">FSBANK_STATE_FAILED</span><span class="p">,</span>
<span class="n">FSBANK_STATE_WARNING</span>
<span class="p">}</span> <span class="n">FSBANK_STATE</span><span class="p">;</span>
</pre></div>
<dl>
<dt id="fsbank_state_decoding">FSBANK_STATE_DECODING</dt>
<dd>Decode a file to usable raw sample data. </dd>
<dt id="fsbank_state_analysing">FSBANK_STATE_ANALYSING</dt>
<dd>Scan sound data for details (such as optimized sample rate). </dd>
<dt id="fsbank_state_preprocessing">FSBANK_STATE_PREPROCESSING</dt>
<dd>Prepares sound data for encoder. </dd>
<dt id="fsbank_state_encoding">FSBANK_STATE_ENCODING</dt>
<dd>Pass the sample data to the chosen encoder. </dd>
<dt id="fsbank_state_writing">FSBANK_STATE_WRITING</dt>
<dd>Write encoded data into an FSB. </dd>
<dt id="fsbank_state_finished">FSBANK_STATE_FINISHED</dt>
<dd>Process complete. </dd>
<dt id="fsbank_state_failed">FSBANK_STATE_FAILED</dt>
<dd>An error has occurred, check data (as <a class="apilink" href="fsbank-api.html#fsbank_statedata_failed">FSBANK_STATEDATA_FAILED</a>) for details. </dd>
<dt id="fsbank_state_warning">FSBANK_STATE_WARNING</dt>
<dd>A warning has been issued, check data (as <a class="apilink" href="fsbank-api.html#fsbank_statedata_warning">FSBANK_STATEDATA_WARNING</a>) for details. </dd>
</dl>
<p><strong>See Also:</strong> <a class="apilink" href="fsbank-api.html#fsbank_progressitem">FSBANK_PROGRESSITEM</a></p>
<h2 api="struct" id="fsbank_statedata_failed"><a href="#fsbank_statedata_failed">20.20 FSBANK_STATEDATA_FAILED</a></h2>
<p>Extra failed state data.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
</div>
</p>
<div class="highlight language-c"><pre><span></span><span class="k">typedef</span> <span class="k">struct</span> <span class="n">FSBANK_STATEDATA_FAILED</span> <span class="p">{</span>
<span class="n">FSBANK_RESULT</span> <span class="n">errorCode</span><span class="p">;</span>
<span class="kt">char</span> <span class="n">errorString</span><span class="p">[</span><span class="mi">256</span><span class="p">];</span>
<span class="p">}</span> <span class="n">FSBANK_STATEDATA_FAILED</span><span class="p">;</span>
</pre></div>
<dl>
<dt id="fsbank_statedata_failed_errorcode">errorCode</dt>
<dd>Error result code. (<a class="apilink" href="fsbank-api.html#fsbank_result">FSBANK_RESULT</a>)</dd>
<dt id="fsbank_statedata_failed_errorstring">errorString</dt>
<dd>Description for error code. </dd>
</dl>
<p>Cast stateData in <a class="apilink" href="fsbank-api.html#fsbank_progressitem">FSBANK_PROGRESSITEM</a> to this struct if the state is <a class="apilink" href="fsbank-api.html#fsbank_state_failed">FSBANK_STATE_FAILED</a></p>
<h2 api="struct" id="fsbank_statedata_warning"><a href="#fsbank_statedata_warning">20.21 FSBANK_STATEDATA_WARNING</a></h2>
<p>Extra warning state data.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
</div>
</p>
<div class="highlight language-c"><pre><span></span><span class="k">typedef</span> <span class="k">struct</span> <span class="n">FSBANK_STATEDATA_WARNING</span> <span class="p">{</span>
<span class="n">FSBANK_RESULT</span> <span class="n">warnCode</span><span class="p">;</span>
<span class="kt">char</span> <span class="n">warningString</span><span class="p">[</span><span class="mi">256</span><span class="p">];</span>
<span class="p">}</span> <span class="n">FSBANK_STATEDATA_WARNING</span><span class="p">;</span>
</pre></div>
<dl>
<dt id="fsbank_statedata_warning_warncode">warnCode</dt>
<dd>Warning result code. (<a class="apilink" href="fsbank-api.html#fsbank_result">FSBANK_RESULT</a>)</dd>
<dt id="fsbank_statedata_warning_warningstring">warningString</dt>
<dd>Description for warning code. </dd>
</dl>
<p>Cast stateData in <a class="apilink" href="fsbank-api.html#fsbank_progressitem">FSBANK_PROGRESSITEM</a> to this struct if the state is <a class="apilink" href="fsbank-api.html#fsbank_state_warning">FSBANK_STATE_WARNING</a></p>
<h2 api="struct" id="fsbank_subsound"><a href="#fsbank_subsound">20.22 FSBANK_SUBSOUND</a></h2>
<p>Representation of how to encode a single subsound in the final FSB.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
</div>
</p>
<div class="highlight language-c"><pre><span></span><span class="k">typedef</span> <span class="k">struct</span> <span class="n">FSBANK_SUBSOUND</span> <span class="p">{</span>
<span class="k">const</span> <span class="kt">char</span><span class="o">*</span> <span class="k">const</span> <span class="o">*</span><span class="n">fileNames</span><span class="p">;</span>
<span class="k">const</span> <span class="kt">void</span><span class="o">*</span> <span class="k">const</span> <span class="o">*</span><span class="n">fileData</span><span class="p">;</span>
<span class="k">const</span> <span class="kt">unsigned</span> <span class="kt">int</span> <span class="o">*</span><span class="n">fileDataLengths</span><span class="p">;</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">numFiles</span><span class="p">;</span>
<span class="n">FSBANK_BUILDFLAGS</span> <span class="n">overrideFlags</span><span class="p">;</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">overrideQuality</span><span class="p">;</span>
<span class="kt">float</span> <span class="n">desiredSampleRate</span><span class="p">;</span>
<span class="kt">float</span> <span class="n">percentOptimizedRate</span><span class="p">;</span>
<span class="p">}</span> <span class="n">FSBANK_SUBSOUND</span><span class="p">;</span>
</pre></div>
<dl>
<dt id="fsbank_subsound_filenames">fileNames</dt>
<dd>List of file names (instead of FSBANK_SUBSOUND::fileData) used to produce an interleaved sound. (<a href="glossary.html#string-format">UTF-8 string</a>)</dd>
<dt id="fsbank_subsound_filedata">fileData</dt>
<dd>List of file data pointers (instead of FSBANK_SUBSOUND::fileNames) used to produce an interleaved sound. </dd>
<dt id="fsbank_subsound_filedatalengths">fileDataLengths</dt>
<dd>List of file data lengths corresponding to the items in the FSBANK_SUBSOUND::fileData list. </dd>
<dt id="fsbank_subsound_numfiles">numFiles</dt>
<dd>Number of items in either FSBANK_SUBSOUND::fileData / FSBANK_SUBSOUND::fileDataLengths or FSBANK_SUBSOUND::fileNames. </dd>
<dt id="fsbank_subsound_overrideflags">overrideFlags</dt>
<dd>Flags that will reverse the equivalent flags passed to <a class="apilink" href="fsbank-api.html#fsbank_build">FSBank_Build</a>. (<a class="apilink" href="fsbank-api.html#fsbank_buildflags">FSBANK_BUILDFLAGS</a>)</dd>
<dt id="fsbank_subsound_overridequality">overrideQuality</dt>
<dd>Override the quality setting passed to <a class="apilink" href="fsbank-api.html#fsbank_build">FSBank_Build</a>. </dd>
<dt id="fsbank_subsound_desiredsamplerate">desiredSampleRate</dt>
<dd>Resample to this sample rate (ignores optimize sample rate setting), up to 192000Hz. </dd>
<dt id="fsbank_subsound_percentoptimizedrate">percentOptimizedRate</dt>
<dd>If using <a class="apilink" href="fsbank-api.html#fsbank_build_optimizesamplerate">FSBANK_BUILD_OPTIMIZESAMPLERATE</a>, this is the percentage of that rate to be used, up to 100.0%.</dd>
</dl>
<p>Subsounds are generally used to encode a single audio file each. However, it is also possible to encode multiple audio files with a single subsound, in which case the audio data from each file will be interleaved when the subsound is encoded in the final FSB. The source files provided in this manner must have the same format and sample rate.</p>
<p><strong>See Also:</strong> <a class="apilink" href="fsbank-api.html#fsbank_build">FSBank_Build</a>, <a class="apilink" href="fsbank-api.html#fsbank_build_optimizesamplerate">FSBANK_BUILD_OPTIMIZESAMPLERATE</a>, <a class="apilink" href="fsbank-api.html#fsbank_buildflags">FSBANK_BUILDFLAGS</a></p></div>
<p class="manual-footer">FMOD Engine User Manual 2.03.13 (2026-03-31). &copy; 2026 Firelight Technologies Pty Ltd.</p>
</div>
</body>
</html>
+726
View File
@@ -0,0 +1,726 @@
<html>
<head>
<title>Glossary</title>
<link rel="stylesheet" href="style/docs.css">
<link rel="stylesheet" href="style/code_highlight.css">
<script type="text/javascript" src="scripts/language-selector.js"></script></head>
<body>
<div class="docs-body">
<div class="manual-toc">
<p>FMOD Engine User Manual 2.03</p>
<ul>
<li><a href="welcome.html">Welcome to the FMOD Engine</a></li>
<li><a href="core-api-concepts.html">Core API Key Concepts</a></li>
<li><a href="running-the-core-api.html">Core API Getting Started</a></li>
<li><a href="loading-and-playing-sounds-in-the-core-api.html">Core API Loading and Playing Sounds</a></li>
<li><a href="spatializing-sounds-in-the-core-api.html">Core API Spatializing Sounds</a></li>
<li><a href="mixing-and-routing-in-the-core-api.html">Core API Mixing and Routing</a></li>
<li><a href="using-dsp-effects-in-the-core-api.html">Core API Using DSP Effects</a></li>
<li><a href="effects-reference.html">Core API Effect Reference</a></li>
<li><a href="managing-resources-in-the-core-api.html">Core API Managing Resources</a></li>
<li><a href="advanced-core-api-topics.html">Core API Advanced Topics</a></li>
<li><a href="core-api.html">Core API Reference</a></li>
<li><a href="studio-api-getting-started.html">Studio API Getting Started</a></li>
<li><a href="studio-guide.html">Studio API Guide</a></li>
<li><a href="studio-api-3d-events.html">Studio API 3D Events</a></li>
<li><a href="studio-api-threads.html">Studio API Threads</a></li>
<li><a href="studio-api.html">Studio API Reference</a></li>
<li><a href="platforms.html">Platform Details</a></li>
<li><a href="dsp-plugin-api-guide.html">Plug-in DSP API Guide</a></li>
<li><a href="plugin-api.html">Plug-in API Reference</a></li>
<li><a href="fsbank-api.html">FSBank API Reference</a></li>
<li><a href="troubleshooting.html">Troubleshooting</a></li>
<li class="manual-current-chapter manual-active-chapter"><a href="glossary.html">Glossary</a><ul>
<li><a href="#2d-vs-3d">2D vs 3D</a></li>
<li><a href="#asset">Asset</a></li>
<li><a href="#audio-channel">Audio channel</a></li>
<li><a href="#automatic-parameter">Automatic Parameter</a></li>
<li><a href="#bank-file">Bank File</a></li>
<li><a href="#callback-behavior">Callback Behavior</a></li>
<li><a href="#channel-group">Channel Group</a></li>
<li><a href="#channel">Channel</a></li>
<li><a href="#compressed-sample">Compressed Sample</a></li>
<li><a href="#documentation-conventions">Documentation Conventions</a><ul>
<li><a href="#parameter-tokens">Parameter Tokens</a></li>
</ul>
</li>
<li><a href="#core-api-profiler-tool">Core API Profiler Tool</a></li>
<li><a href="#core-api">Core API</a></li>
<li><a href="#distance-units">Distance Units</a></li>
<li><a href="#down-mixing">Down Mixing</a></li>
<li><a href="#dsp-chain">DSP Chain</a></li>
<li><a href="#dsp-clock">DSP Clock</a></li>
<li><a href="#dsp-effect">DSP Effect</a></li>
<li><a href="#dsp-engine">DSP Engine</a></li>
<li><a href="#dsp-graph">DSP Graph</a></li>
<li><a href="#dsp-sub-graph">DSP Sub-graph</a></li>
<li><a href="#dsp">DSP</a></li>
<li><a href="#effect">Effect</a></li>
<li><a href="#fmod-engine">FMOD Engine</a></li>
<li><a href="#fmod-for-unity">FMOD for Unity</a></li>
<li><a href="#fmod-for-unreal-engine">FMOD for Unreal Engine</a></li>
<li><a href="#fmod-studio">FMOD Studio</a></li>
<li><a href="#fsb">FSB</a></li>
<li><a href="#guid">GUID</a></li>
<li><a href="#handedness">Handedness</a></li>
<li><a href="#loading-mode">Loading Mode</a></li>
<li><a href="#metadata">Metadata</a></li>
<li><a href="#mixer">Mixer</a></li>
<li><a href="#reading-sound-data">Reading Sound Data</a></li>
<li><a href="#sample-data">Sample Data</a><ul>
<li><a href="#endianness">Endianness</a></li>
<li><a href="#sample-formats">Sample Formats</a></li>
<li><a href="#samples-vs-bytes-vs-milliseconds">Samples vs Bytes vs Milliseconds</a></li>
</ul>
</li>
<li><a href="#sample">Sample</a></li>
<li><a href="#signal">Signal</a></li>
<li><a href="#sound">Sound</a></li>
<li><a href="#streaming-sample-data">Streaming Sample Data</a></li>
<li><a href="#stream">Stream</a><ul>
<li><a href="#streaming-issues">Streaming Issues</a></li>
</ul>
</li>
<li><a href="#string-format">String Format</a></li>
<li><a href="#studio-api">Studio API</a></li>
<li><a href="#studio-guids-and-paths">Studio GUIDs and Paths</a></li>
<li><a href="#studio-strings-bank">Studio Strings Bank</a></li>
<li><a href="#studio-update-thread">Studio Update Thread</a></li>
<li><a href="#subsound">Subsound</a></li>
<li><a href="#sync-points">Sync Points</a></li>
<li><a href="#system">System</a></li>
<li><a href="#up-mixing">Up Mixing</a></li>
<li><a href="#user-data">User Data</a></li>
<li><a href="#version">Version</a></li>
</ul>
</li>
</ul>
</div>
<div class="manual-content api">
<h1>22. Glossary</h1>
<h2 id="2d-vs-3d"><a href="#2d-vs-3d">22.1 2D vs 3D</a></h2>
<p>A 3D sound <strong>source</strong> is a <a class="apilink" href="core-api-channel.html">Channel</a> that has a position and a velocity in space. When a 3D <a class="apilink" href="core-api-channel.html">Channel</a> is playing, its volume, speaker placement and pitch will be affected automatically based on the relation to the <strong>listener</strong>.</p>
<p>A <strong>listener</strong> is typically the location of the player or the game camera. It has a position and velocity like a sound <strong>source</strong>, but it also has an orientation.</p>
<p>3D Sound behaviour:</p>
<ul>
<li><strong>Volume</strong> is affected by the relative distance of the <strong>listener</strong> and the <strong>source</strong>.</li>
<li><strong>Pitch</strong> is affected by the relative velocity of the <strong>listener</strong> and the <strong>source</strong> (This causes the doppler effect).</li>
<li><strong>Pan</strong> is affected by the relative orientation of the <strong>listener</strong> to the position of the <strong>source</strong>.</li>
</ul>
<p>2D Sound behaviour:</p>
<ul>
<li>3D <strong>listener</strong> and <strong>source</strong> positions, velocities and orientations are ignored and have no effect.</li>
<li>2D specific funcionality such as <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setmixlevelsoutput">ChannelControl::setMixLevelsOutput</a>, <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setmixmatrix">ChannelControl::setMixMatrix</a> and <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_setpan">ChannelControl::setPan</a> will allow manual panning of audio.</li>
</ul>
<p><strong>Note:</strong> You can blend between a 3D mix and a 2D mix with <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_set3dlevel">ChannelControl::set3DLevel</a>.</p>
<p>For a more detailed description of 3D sound behaviour, see the <a href="spatializing-sounds-in-the-core-api.html">Spatializing Sounds in the Core API</a> chapter.</p>
<h2 id="asset"><a href="#asset">22.2 Asset</a></h2>
<p>An audio asset is a prerecorded sound that could potentially be used in a game. Assets can be loose audio files, or can be built into <a href="glossary.html#bank-file">bank files</a> or <a href="glossary.html#fsb">FSBs</a>.</p>
<h2 id="audio-channel"><a href="#audio-channel">22.3 Audio channel</a></h2>
<p>An audio channel is a monoaural signal generally associated with a particular speaker. For example, a stereo <a href="glossary.html#signal">signal</a> contains two channels, left and right. This is unrelated to the FMOD <a href="glossary.html#channel">Channel</a> class.</p>
<h2 id="automatic-parameter"><a href="#automatic-parameter">22.4 Automatic Parameter</a></h2>
<p>An automatic parameter (also known in <a href="glossary.html#fmod-studio">FMOD Studio</a> as a <a href="https://fmod.com/docs/2.03/studio/glossary.html#built-in-parameter">built-in parameter</a>) is any <a href="studio-guide.html#setting-parameters">parameter</a> whose value is automatically set based on the event instance's <a href="studio-api-eventinstance.html#studio_eventinstance_set3dattributes">3D attributes</a> whenever the <a href="glossary.html#system">Studio system</a> is updated.</p>
<p>Types of automatic parameter include:</p>
<ul>
<li>FMOD_STUDIO_PARAMETER_AUTOMATIC_DISTANCE</li>
<li>FMOD_STUDIO_PARAMETER_AUTOMATIC_EVENT_CONE_ANGLE</li>
<li>FMOD_STUDIO_PARAMETER_AUTOMATIC_EVENT_ORIENTATION</li>
<li>FMOD_STUDIO_PARAMETER_AUTOMATIC_DIRECTION</li>
<li>FMOD_STUDIO_PARAMETER_AUTOMATIC_ELEVATION</li>
<li>FMOD_STUDIO_PARAMETER_AUTOMATIC_LISTENER_ORIENTATION</li>
<li>FMOD_STUDIO_PARAMETER_AUTOMATIC_SPEED</li>
<li>FMOD_STUDIO_PARAMETER_AUTOMATIC_SPEED_ABSOLUTE</li>
</ul>
<p>For more information about these parameter types, see the <a href="studio-api-common.html#fmod_studio_parameter_type">FMOD_STUDIO_PARAMETER_TYPE</a> section of the <a href="studio-api.html">Studio API Reference</a> chapter.</p>
<h2 id="bank-file"><a href="#bank-file">22.5 Bank File</a></h2>
<p>A bank file, or "bank," is a collection of content created in an <a href="glossary.html#fmod-studio">FMOD Studio</a> project, formatted and compressed for use with the version of the <a href="glossary.html#fmod-engine">FMOD Engine</a> integrated into in your game.</p>
<p>Bank files usually contain both <a href="glossary.html#metadata">metadata</a> and <a href="glossary.html#sample-data">sample data</a>. However, it is also possible to create split banks whose sample data and metadata are in separate bank files. Splitting banks in this fashion slightly increases overhead at run time, but can help keep patch size low if it is ever necessary to release a patched version of your game that includes changes to the audio metadata but not the sample data.</p>
<p>Bank files are compatible with any version of the FMOD Engine with the same major and product version numbers as the version of FMOD Studio used to create them. For example, a bank built in FMOD Studio version 2.00.03 is compatible with FMOD Engine versions 2.00.03, 2.00.00, and 2.00.10, but not with versions 1.10.14, 1.00.03, and 2.01.03.</p>
<p>At least one bank in any FMOD Studio project is a <span class="dead-link" href="glossary.html#master-bank">master bank</span class="dead-link">. A master bank contains data relevant to your entire FMOD Studio project, and so at least one master bank must be loaded into memory before <em>any</em> event in <em>any</em> bank may be used by your game. Most games have a single master bank that is kept loaded into memory at all times.</p>
<p>Bank files (.bank) should not be confused with <a href="glossary.html#fsb">FMOD Sample Bank files (.fsb)</a>. They are two different formats.</p>
<p>For more information about using bank files in the FMOD Engine, see the <a href="studio-guide.html#bank-layout">Bank Layout</a>, <a href="studio-guide.html#bank-loading">Bank Loading</a>, and <a href="studio-guide.html#bank-unload">Bank Unload</a> sections of the <a href="studio-guide.html">Studio API Guide</a> chapter, as well as the <a href="studio-api-bank.html">Studio::Bank</a> subchapter of the <a href="studio-api.html">Studio API Reference</a> chapter.</p>
<h2 id="callback-behavior"><a href="#callback-behavior">22.6 Callback Behavior</a></h2>
<p>Only one callback is stored for each <a class="apilink" href="core-api-system.html">System</a>/<a class="apilink" href="studio-api-system.html">Studio::System</a>/<a class="apilink" href="studio-api-eventinstance.html">Studio::EventInstance</a>/<a class="apilink" href="core-api-channelcontrol.html">ChannelControl</a>/<a class="apilink" href="core-api-dsp.html">DSP</a>. Therefore, any registered callback should handle all required callback types and indicate those types via the callback type mask.</p>
<p>All calls to callbacks are issued per type. This means that if, for example, you use <a class="apilink" href="core-api-system.html#system_setcallback">System::setCallback</a> with <a class="apilink" href="core-api-system.html#fmod_system_callback_all">FMOD_SYSTEM_CALLBACK_ALL</a>, when the callback is called, only one type will be passed for the <code>type</code> argument. Multiple types will not be combined for a single call.</p>
<p><strong>C/C++ behavior</strong>. Casting your own function type to an FMOD callback could cause a crash or corruption. For callback declaration always use F_CALL between the return type and the function name, and use the correct C types for all callback parameters. </p>
<h2 id="channel-group"><a href="#channel-group">22.7 Channel Group</a></h2>
<p>A channel group allows attributes to be set on a group of <a href="glossary.html#channel">channels</a> collectively. A <a href="glossary.html#channel-group">channel group</a> also allows you to operate on a the final mixed <a href="glossary.html#signal">signal</a> of the output of its <a href="glossary.html#channel">channels</a> and child <a href="glossary.html#channel-group">channel groups</a>. This is known as a 'sub mix'.</p>
<p>A <a href="glossary.html#channel-group">channel group</a> can be created with <a class="apilink" href="core-api-system.html#system_createchannelgroup">System::createChannelGroup</a>, which returns a <a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a> object.</p>
<p>The sub mix buffer can be processed with <a href="glossary.html#effect">effects</a> (see <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_adddsp">ChannelControl::addDSP</a>), saving CPU time compared to applying the same effect to multiple <a href="glossary.html#channel">channels</a> individually.</p>
<p>The signal processing of a <a href="glossary.html#channel-group">channel group</a> persists even when a <a href="glossary.html#channel">channel</a> has stopped.</p>
<p>A <a href="glossary.html#channel-group">channel group</a> can contain many children <a href="glossary.html#channel-group">channel groups</a>, but can only have one parent <a href="glossary.html#channel-group">channel group</a>. See <a class="apilink" href="core-api-channelgroup.html#channelgroup_addgroup">ChannelGroup::addGroup</a> and <a class="apilink" href="core-api-channelgroup.html#channelgroup_getparentgroup">ChannelGroup::getParentGroup</a>.</p>
<h2 id="channel"><a href="#channel">22.8 Channel</a></h2>
<p>A Channel is a playing instance of a <a class="apilink" href="core-api-sound.html">Sound</a>. This is unrelated to an <a href="glossary.html#audio-channel">audio channel</a>.</p>
<p>After loading or creating a <a class="apilink" href="core-api-sound.html">Sound</a>, it is playable via the <a class="apilink" href="core-api-system.html#system_playsound">System::playSound</a> command which returns a Channel object for run-time manipulation of its properties.</p>
<p>FMOD automatically selects a Channel for the sound to play on, you do not have to manage your own Channels.</p>
<p>Set the maximum number of Channels playable with <a class="apilink" href="core-api-system.html#system_init">System::init</a>. For more information on Channels and how they can be real or virtual, see the <a href="managing-resources-in-the-core-api.html#virtual-voice-system">Virtual Voice System</a> section of the <a href="managing-resources-in-the-core-api.html">Managing Resources in the Core API</a> chapter.</p>
<h2 id="compressed-sample"><a href="#compressed-sample">22.9 Compressed Sample</a></h2>
<p>Parent topic : <a href="glossary.html#sound">Sound</a></p>
<p>Compressed Samples are suited for small sounds that need to be played more than once at a time, for example sound effects. </p>
<p>Only certain file formats are supported with this type of sound. File formats such as .MP2, .MP3, and .FSB (using FADPCM, Vorbis, AT9 and XMA codecs).<br />
This type of sound is stored in memory in its native compressed format, and decodes in real-time while playing.</p>
<p>Use <a class="apilink" href="core-api-common.html#fmod_createcompressedsample">FMOD_CREATECOMPRESSEDSAMPLE</a> to create a <a class="apilink" href="core-api-sound.html">Sound</a> object in this mode.</p>
<table>
<thead>
<tr>
<th>Compressed Sample attributes</th>
<th>Comparison</th>
</tr>
</thead>
<tbody>
<tr>
<td>Keeps sound compressed into memory.</td>
<td>Can use less memory than a <a href="glossary.html#sample">sample</a>, large sounds can use more than a <a href="glossary.html#stream">stream</a>.</td>
</tr>
<tr>
<td>Higher CPU overhead during playback.</td>
<td>Uses more CPU than a <a href="glossary.html#sample">sample</a>, slightly less than a <a href="glossary.html#stream">stream</a>.</td>
</tr>
<tr>
<td>Fast to load.</td>
<td>Faster than a <a href="glossary.html#sample">sample</a>, possibly slower than a <a href="glossary.html#stream">stream</a> with very large sounds.</td>
</tr>
<tr>
<td>Can play more than 1 at a time.</td>
<td>Better polyphony than a <a href="glossary.html#stream">stream</a>.</td>
</tr>
</tbody>
</table>
<p><strong>Note</strong>: Compressed samples have a context allocated for each instance of playback. This requires a fixed start up memory overhead. See <a class="apilink" href="core-api-system.html#fmod_advancedsettings">FMOD_ADVANCEDSETTINGS</a> to control codec maximums.</p>
<h2 id="documentation-conventions"><a href="#documentation-conventions">22.10 Documentation Conventions</a></h2>
<h3 id="parameter-tokens"><a href="#parameter-tokens">22.10.1 Parameter Tokens</a></h3>
<table>
<thead>
<tr>
<th align="center">Token</th>
<th>Meaning</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center"><span><span class="token" title="Output">Out</span></span></td>
<td>The API function will fill in information in this parameter.</td>
</tr>
<tr>
<td align="center"><span><span class="token" title="Optional">Opt</span></span></td>
<td>This parameter is optional, specify null or zero to ignore.</td>
</tr>
<tr>
<td align="center"><span><span class="token" title="Read-only">R/O</span></span></td>
<td>This token applies to members of various structures which FMOD passes to user callbacks. User callbacks must not modify the values of these members. Modifying the values of these members will cause undefined behavior.</td>
</tr>
<tr>
<td align="center"><span><span class="token" title="C#only">C#</span></span></td>
<td>This is only available in C#.</td>
</tr>
<tr>
<td align="center"><span><span class="token" title="Javascript-only">JS</span></span></td>
<td>This is only available in Javascript.</td>
</tr>
</tbody>
</table>
<h2 id="core-api-profiler-tool"><a href="#core-api-profiler-tool">22.11 Core API Profiler Tool</a></h2>
<p>The core API profiler tool, also known as the FMOD Profiler or <code>FMOD Profiler.exe</code>, is a tool for profiling your game's <a href="glossary.html#dsp-graph">DSP graph</a> and performance. It can be found in the /bin directory of the FMOD Engine distribution.</p>
<p>To profile your game with the core API profiler tool, you must specify FMOD_INIT_PROFILE_ENABLE when initializing the Core API. For more information about initialization flags, see the <a href="core-api-system.html#fmod_init_profile_enable">FMOD_INITFLAGS</a> section of the <a href="core-api.html">Core API Reference</a> chapter.</p>
<h2 id="core-api"><a href="#core-api">22.12 Core API</a></h2>
<p>The Core API is a programmer API that allows the manipulation of low-level audio primitives, and is the backbone of the <a href="glossary.html#fmod-engine">FMOD Engine</a>.</p>
<p>Unlike the <a href="glossary.html#studio-api">Studio API</a>, the Core API is a standalone solution that allows you to implement every part of your game's audio using only code, and does not require the use of <a href="glossary.html#fmod-studio">FMOD Studio</a> to design audio content. However, while it is more powerful than the Studio API, it includes fewer convenience functions, and so is best used in games that require more flexibility than the Studio API can provide.</p>
<p>The Core API and Studio API together comprise the <a href="glossary.html#fmod-engine">FMOD Engine</a>.</p>
<p>For more information about the Core API, see the <a href="core-api-concepts.html">Core API Concepts</a> and <a href="core-api.html">Core API Reference</a> chapters.</p>
<h2 id="distance-units"><a href="#distance-units">22.13 Distance Units</a></h2>
<p>The unit of measurement for distances for 3D calculations. By default 1 disance unit is equivalent to 1 meter. To use your game's distance units specify the scale of your game's distance units to meters using <a class="apilink" href="core-api-system.html#system_set3dsettings">System::set3DSettings</a>. </p>
<h2 id="down-mixing"><a href="#down-mixing">22.14 Down Mixing</a></h2>
<p>When the source <a href="glossary.html#signal">signal</a> channel count is higher than the destination, it will distribute its higher channel information into the lower speaker mode's channels.<br />
This example is a table of the speakers in a stereo output with the input speakers of a 7.1 signal. Values in table represent attenuation. 0dB = full volume, - = silence.</p>
<table>
<thead>
<tr>
<th>Output speaker</th>
<th>Front left in</th>
<th>Front right in</th>
<th>Center in</th>
<th>LFE in</th>
<th>Surround left in</th>
<th>Surround right in</th>
<th>Back left in</th>
<th>Back right in</th>
</tr>
</thead>
<tbody>
<tr>
<td>Left</td>
<td>0dB</td>
<td>-</td>
<td>-3dB</td>
<td>-</td>
<td>-3dB</td>
<td>-</td>
<td>-6dB</td>
<td>-</td>
</tr>
<tr>
<td>Right</td>
<td>-</td>
<td>0dB</td>
<td>-3dB</td>
<td>-</td>
<td>-</td>
<td>-3dB</td>
<td>-</td>
<td>-6dB</td>
</tr>
</tbody>
</table>
<p><em>Example of a higher 7.1 speaker mode signal being down mixed to a stereo output. When more than one input channel contributes to the output speaker, the inputs are summed/mixed together.</em></p>
<h2 id="dsp-chain"><a href="#dsp-chain">22.15 DSP Chain</a></h2>
<p>A DSP chain is a type of <a href="glossary.html#dsp-sub-graph">DSP sub-graph</a> in which multiple <a href="glossary.html#dsp">DSP units</a> are connected together in a linear fashion. Each <a class="apilink" href="core-api-channel.html">Channel</a> and <a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a> contains a DSP chain.</p>
<p>A DSP is capable of multiple inputs, but in a DSP chain each DSP is connected to the next with one input, all the way from the tail to the head. See <a class="apilink" href="core-api-channelcontrol.html#fmod_channelcontrol_dsp_index">FMOD_CHANNELCONTROL_DSP_INDEX</a> for special named offsets for 'head' and 'tail' and 'fader' units.</p>
<p><img alt="DSP Chain" src="images/dsp-chain.png" /></p>
<p>A typical <a class="apilink" href="core-api-channel.html">Channel</a> is represented above, with a node at the 'head' (of type <a class="apilink" href="core-api-common-dsp-effects.html#fmod_dsp_type_fader">FMOD_DSP_TYPE_FADER</a> to allow volume control and panning), which is fed by an <a href="effects-reference.html#echo">echo effect</a> (of type <a class="apilink" href="core-api-common-dsp-effects.html#fmod_dsp_type_echo">FMOD_DSP_TYPE_ECHO</a>) which is in turn fed by a PCM wavetable unit (of type that is internal to FMOD) at the 'tail'. The <a href="glossary.html#signal">signal</a> feeds from right to left to the DSP chain's head, before continuing to the next connected DSP (not pictured).</p>
<h2 id="dsp-clock"><a href="#dsp-clock">22.16 DSP Clock</a></h2>
<p>Each <a href="glossary.html#dsp">DSP unit</a> has an associated DSP clock. The speed of this clock affects any time-based behavior the DSP has, such that a DSP with a faster DSP clock will change the way it processes the <a href="glossary.html#signal">signal</a> more rapidly than one with a slower clock.</p>
<p>By default, all DSP clocks run at the same speed, helping ensure that different <a href="glossary.html#channel">channels</a> and <a href="glossary.html#channel-group">channel groups</a> remain synchronized. However, if a channel or channel group is subject to pitch adjustment, the DSP clocks associated with that channel or channel group may run at a faster or slower rate in order to account for the time stretching inherent to pitch changes.</p>
<p>DSP clocks are used for scheduling various time-based behaviors, including those of <a href="core-api-channelcontrol.html#channelcontrol_setdelay">ChannelControl::setDelay</a> in the <a href="glossary.html#core-api">Core API</a> and <a href="https://fmod.com/docs/2.03/studio/glossary.html#modulator">modulators</a> in <a href="glossary.html#fmod-studio">FMOD Studio</a>.</p>
<h2 id="dsp-effect"><a href="#dsp-effect">22.17 DSP Effect</a></h2>
<p>A DSP effect is an <a href="glossary.html#effect">effect</a> that makes use of a <a href="glossary.html#dsp">DSP unit</a>.</p>
<h2 id="dsp-engine"><a href="#dsp-engine">22.18 DSP Engine</a></h2>
<p>The DSP engine is the portion of the <a href="glossary.html#fmod-engine">FMOD Engine</a> that traverses, executes, and mixes the <a href="glossary.html#dsp-graph">DSP graph</a>.</p>
<p>For more information about the DSP engine, see the <a href="using-dsp-effects-in-the-core-api.html#dsp-architecture-and-usage">DSP Architecture and Usage</a> section of the <a href="using-dsp-effects-in-the-core-api.html">Using DSP Effects in the Core API</a> chapter.</p>
<h2 id="dsp-graph"><a href="#dsp-graph">22.19 DSP Graph</a></h2>
<p>The DSP graph is made of <a href="glossary.html#dsp">DSP units</a> linked together into a network by <a href="core-api-dspconnection.html">DSPConnections</a>. <a href="glossary.html#signal">Audio signals</a> originate and flow through the DSP graph, being processed by the DSP units they pass through and combined into a submix whenever multiple DSPConnections target the same DSP unit, until they arrive at an output. The DSP graph allows audio to be dynamically processed and mixed, and so is the foundation of all dynamic game audio in FMOD.</p>
<p>Normally, an FMOD project has one DSP graph. Sections of a DSP graph may be referred to as <a href="glossary.html#dsp-sub-graph">sub-graphs</a> for the purpose of easy discussion.</p>
<p>An FMOD project's DSP graph may be viewed by using the <a href="glossary.html#core-api-profiler-tool">FMOD Profiler</a>, as long as you specify <a href="core-api-system.html#fmod_initflags">FMOD_INIT_PROFILE_ENABLE</a> when initializing the Core API.</p>
<p>For more information about DSP graphs, see the <a href="using-dsp-effects-in-the-core-api.html#dsp-architecture-and-usage">DSP Architecture and Usage</a> section of the <a href="using-dsp-effects-in-the-core-api.html">Using DSP Effects in the Core API</a> chapter.</p>
<h2 id="dsp-sub-graph"><a href="#dsp-sub-graph">22.20 DSP Sub-graph</a></h2>
<p>A DSP sub-graph is an arbitrary subset of the <a href="glossary.html#dsp">DSP units</a> and <a href="core-api-dspconnection.html">DSPConnections</a> in a <a href="glossary.html#dsp-graph">DSP graph</a>. They are not represented in code; rather, they are a useful abstraction when discussing a project's DSP interactions, as they are easier to conceptualize of than the entire DSP graph.</p>
<h2 id="dsp"><a href="#dsp">22.21 DSP</a></h2>
<p>DSP stands for "Digital Signal Processing", and usually relates to processing raw PCM samples to alter the sound. A DSP unit (or just "a DSP") is a modular node in the <a href="glossary.html#dsp-graph">DSP graph</a> that's capable of a specific kind of digital signal processing. Many DSPs are used in <a href="glossary.html#effect">effects</a>, or to process audio in other situations.</p>
<p>DSPs can be added to an FMOD <a class="apilink" href="core-api-channel.html">Channel</a>, or <a class="apilink" href="core-api-channelgroup.html">ChannelGroup</a> with the <a class="apilink" href="core-api-channelcontrol.html#channelcontrol_adddsp">ChannelControl::addDSP</a> function.</p>
<p>FMOD provides a suite of DSPs that can alter sounds in interesting ways, such as better simulating real-world sound behavior or exaggerating sounds. Examples of such DSPs include the <a href="effects-reference.html#echo">echo</a>, <a href="effects-reference.html#sfx-reverb">SFX reverb</a>, <a href="effects-reference.html#it-low-pass">IT low pass</a>, <a href="effects-reference.html#flange">flange</a>, and <a href="effects-reference.html#chorus">chorus</a> DSPs.</p>
<p>You can also write your own DSPs by using <a class="apilink" href="core-api-system.html#system_createdsp">System::createDSP</a>. For more information about writing DSPs, see the <a href="plugin-api-dsp.html">DSP</a> subchapter of the <a href="plugin-api.html">Plug-in API Reference</a> chapter.</p>
<h2 id="effect"><a href="#effect">22.22 Effect</a></h2>
<p>In the FMOD Engine, an effect is a modular unit that manipulates a <a href="glossary.html#signal">signal</a> in some way. Most effects are <a href="glossary.html#dsp-effect">DSP effects</a>, which is to say, they use digital signal processing units to alter the signal.</p>
<p>The effects included in the FMOD Engine are detailed in the <a href="effects-reference.html">Effects Reference</a> chapter.<br />
Many FMOD Engine effects also exist as <a href="https://fmod.com/docs/2.03/studio/glossary.html#effect">FMOD Studio effects</a>, though not all.</p>
<h2 id="fmod-engine"><a href="#fmod-engine">22.23 FMOD Engine</a></h2>
<p>The FMOD Engine is a runtime library for playing adaptive audio in games. It consists of two APIs: The <a href="glossary.html#studio-api">Studio API</a>, and the <a href="glossary.html#core-api">Core API</a>. Content created in <a href="glossary.html#fmod-studio">FMOD Studio</a> can be built as <a href="glossary.html#bank-file">.bank files</a>, which can then be loaded and played in the FMOD Engine using the Studio API. The Core API allows audio programmers to create audio content without using FMOD Studio, and to interact with the FMOD Engine's underlying mechanisms.</p>
<p>For more information about the FMOD Engine, see the <a href="welcome.html">FMOD Engine User Manual</a>. You're reading it right now.</p>
<h2 id="fmod-for-unity"><a href="#fmod-for-unity">22.24 FMOD for Unity</a></h2>
<p>FMOD for Unity is a packaged software integration of the <a href="glossary.html#fmod-engine">FMOD Engine</a> for use with the Unity game engine. This integration makes it possible use dynamic audio content created in <a href="glossary.html#fmod-studio">FMOD Studio</a> in your Unity game.</p>
<p>FMOD for Unity includes a full copy of the FMOD Engine, so it is not necessary to install the FMOD Engine separately.</p>
<p>For detailed guidance on FMOD for Unity, see our <a href="https://fmod.com/docs/2.03/unity">Unity Integration</a> documentation.</p>
<h2 id="fmod-for-unreal-engine"><a href="#fmod-for-unreal-engine">22.25 FMOD for Unreal Engine</a></h2>
<p>FMOD for Unreal Engine is a packaged software integration of the <a href="glossary.html#fmod-engine">FMOD Engine</a> for use with the Unreal Engine game engine. This integration makes it possible use dynamic audio content created in <a href="glossary.html#fmod-studio">FMOD Studio</a> in your Unreal Engine game.</p>
<p>FMOD for Unreal Engine includes a full copy of the FMOD Engine, so it is not necessary to install the FMOD Engine separately.</p>
<p>For detailed guidance on FMOD for Unreal Engine, see our <a href="https://fmod.com/docs/2.03/ue4">Unreal Engine Integration</a> documentation.</p>
<h2 id="fmod-studio"><a href="#fmod-studio">22.26 FMOD Studio</a></h2>
<p>FMOD Studio is an application that allows sound designers and composers to create <a href="https://fmod.com/docs/2.03/studio/glossary.html#adaptive-audio">adaptive audio</a> content for games. Content created in FMOD Studio can be built as <a href="https://fmod.com/docs/2.03/studio/glossary.html#bank-file">.bank files</a>, which can then be loaded and played in the <a href="glossary.html#fmod-engine">FMOD Engine</a> using the <a href="glossary.html#studio-api">Studio API</a>.</p>
<p>For more information about FMOD Studio, see the <a href="https://fmod.com/docs/2.03/studio">FMOD Studio User Manual</a>.</p>
<h2 id="fsb"><a href="#fsb">22.27 FSB</a></h2>
<p>.fsb files (also known as "FMOD Soundbanks" or "FSBs") are a proprietary file format that acts as a container for encoded and compressed sample data. They are built using <a href="fsbank-api.html">FSBank API</a> or the FMOD Soundbank Generator tool that comes packaged with the <a href="glossary.html#fmod-engine">FMOD Engine</a>, and their content can be loaded and played using the <a href="glossary.html#core-api">Core API</a>.</p>
<p>.fsb files should not be confused with the .bank files built in FMOD Studio. Unlike FMOD Studio's .bank files, .fsb files cannot contain event or mixer metadata, but their sampledata can be loaded and played using the Core API without needing the <a href="glossary.html#studio-api">Studio API</a>. In most cases, if your game uses the Studio API, you should use .bank files; whereas if your game uses only the Core API, you should use .fsb files.</p>
<p>The FMOD Engine is compatible with all .fsb files built using the FSBank API and the FMOD Soundbank Generator tool that comes packaged with the FMOD Engine. .fsb files that were instead built using older tools (such as FMOD Designer, FMOD Ex, or versions of the FMOD Soundbank Generator tool distributed with FMOD Ex) use older, deprecated codecs, and so are not compatible with the FMOD Engine.</p>
<h2 id="guid"><a href="#guid">22.28 GUID</a></h2>
<p>A GUID is a unique string used to identify a digital object, and stands for <strong>G</strong>lobally <strong>U</strong>nique <strong>Id</strong>entifier. In the <a href="glossary.html#fmod-engine">FMOD Engine</a>, GUIDs are commonly used to invoke and define relationships between the various elements of a project. For example, every <span class="dead-link" href="glossary.html#event">event</span class="dead-link">, <a href="glossary.html#asset">asset</a>, <span class="dead-link" href="glossary.html#bus">bus</span class="dead-link">, <span class="dead-link" href="glossary.html#parameter">parameter</span class="dead-link">, <span class="dead-link" href="glossary.html#snapshot">snapshot</span class="dead-link">, <a href="glossary.html#effect">effect</a>, <a href="glossary.html#bank-file">bank</a>, and <span class="dead-link" href="glossary.html#instrument">instrument</span class="dead-link"> in an FMOD Studio project has a GUID, and each such object's metadata includes the GUIDs of other objects that it references or is referenced by.</p>
<p>Certain APIs allow you to specify which object to affect by GUID. For example, <a href="studio-api-system.html#studio_system_geteventbyid">Studio::System::getEventByID</a> gets the <a href="studio-api-eventdescription.html">eventDescription</a> of an event with a specified GUID.</p>
<p>GUIDs are a form of <a href="glossary.html#metadata">metadata</a>. The GUID structure used by the FMOD Engine is defined by <a href="core-api-common.html#fmod_guid">FMOD_GUID</a>.</p>
<h2 id="handedness"><a href="#handedness">22.29 Handedness</a></h2>
<p>Handedness is an innate property of 3D cartesian coordinate systems. The handedness of the coordinate system specifies the relative direction of the Z axis along the line perpendicular to the X and Y axes, and the direction of positive rotations when an axis is directed towards the point of view.</p>
<p>When the X axis is directed to the right, and the Y axis is directed upwards:</p>
<ul>
<li>A left-handed coordinate system's Z is directed <em>away</em> from the point of view, and rotations in the positive direction are <em>clockwise</em>.</li>
<li>A right-handed coordinate system's Z axis is directed <em>towards</em> the point of view, and rotations in the positive direction are <em>counter-clockwise</em>.</li>
</ul>
<p>For 3D spatialization to behave intuitively, it is important that FMOD is configured to use the same orientation as your game's coordinate system. By default FMOD uses a left-handed coordinate system, but FMOD may also be configured to use a right-handed coordinate system by passing <a class="apilink" href="core-api-system.html#fmod_init_3d_righthanded">FMOD_INIT_3D_RIGHTHANDED</a> to <a class="apilink" href="core-api-system.html#system_init">System::init</a>.</p>
<h2 id="loading-mode"><a href="#loading-mode">22.30 Loading Mode</a></h2>
<p>The loading mode of an <a href="glossary.html#asset">asset</a> is the way in which that asset's <a href="glossary.html#sample-data">sample data</a> is loaded into memory so that it can be played. There are three possible loading modes:</p>
<ul>
<li><strong>Compressed.</strong> In this mode, the asset's sample data is loaded into memory in a compressed format in advance of its being played. This sample data is then decompressed in real time whenever an instance of the asset is played. This mode requires less memory than decompressed loading mode, but requires more CPU to play the loaded asset.</li>
<li><strong>Decompressed.</strong> In this mode, the asset's sample data is loaded into memory in a decompressed format in advance of being played. This mode requires more memory than compressed loading mode, but does not require as much CPU to play the loaded asset.</li>
<li><strong>Streaming.</strong> In this mode, each playing instance of the asset requires a separate stream. Each stream is a ring buffer; the asset associated with a stream is loaded piecemeal from disk into the buffer, and each piece is played as soon as it is loaded then immediately overwritten by the next piece. Because only a small part of the asset is loaded into memory at any given time, streaming assets require only a small amount of memory compared to the other loading modes. However, because each instance of a streaming asset requires a separate buffer that loads the asset independently, each contemporaneously playing instance of an asset with this loading mode requires constant file I/O.</li>
</ul>
<p>For more information about loading assets in the FMOD Engine, see the <a href="studio-guide.html#sample-data-loading">Sample Data Loading</a> section of the <a href="studio-guide.html">Studio API Guide</a> chapter. For more information about the streaming loading mode specifically, see the <a href="loading-and-playing-sounds-in-the-core-api.html#streams">Streams</a> section of the <a href="loading-and-playing-sounds-in-the-core-api.html">Loading and Playing Sounds in the Core API</a> chapter.</p>
<h2 id="metadata"><a href="#metadata">22.31 Metadata</a></h2>
<p>Metadata is data that describes other data. In FMOD Studio and the FMOD Engine, "metadata" usually means the data that describes how <a href="glossary.html#sample-data">sample data</a> is to be used in a game, i.e.: the data that defines an <a href="glossary.html#fmod-studio">FMOD Studio</a> project's <span class="dead-link" href="glossary.html#event">events</span class="dead-link">, <a href="glossary.html#mixer">mixer</a>, and other non-sample data content. This kind of metadata is packaged into <a href="glossary.html#bank-file">bank files</a> whenever a project is built in FMOD Studio.</p>
<h2 id="mixer"><a href="#mixer">22.32 Mixer</a></h2>
<p>See <a href="glossary.html#dsp-graph">DSP graph</a>.</p>
<h2 id="reading-sound-data"><a href="#reading-sound-data">22.33 Reading Sound Data</a></h2>
<p>The following shows how to read sound data to a buffer using <a class="apilink" href="core-api-sound.html#sound_readdata">Sound::readData</a>.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="n">FMOD</span><span class="o">::</span><span class="n">Sound</span> <span class="o">*</span><span class="n">sound</span><span class="p">;</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">length</span><span class="p">;</span>
<span class="kt">char</span> <span class="o">*</span><span class="n">buffer</span><span class="p">;</span>
<span class="n">system</span><span class="o">-&gt;</span><span class="n">createSound</span><span class="p">(</span><span class="s">&quot;drumloop.wav&quot;</span><span class="p">,</span> <span class="n">FMOD_DEFAULT</span> <span class="o">|</span> <span class="n">FMOD_OPENONLY</span><span class="p">,</span> <span class="k">nullptr</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">sound</span><span class="p">);</span>
<span class="n">sound</span><span class="o">-&gt;</span><span class="n">getLength</span><span class="p">(</span><span class="o">&amp;</span><span class="n">length</span><span class="p">,</span> <span class="n">FMOD_TIMEUNIT_RAWBYTES</span><span class="p">);</span>
<span class="n">buffer</span> <span class="o">=</span> <span class="k">new</span> <span class="kt">char</span><span class="p">[</span><span class="n">length</span><span class="p">];</span>
<span class="n">sound</span><span class="o">-&gt;</span><span class="n">readData</span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span> <span class="n">length</span><span class="p">,</span> <span class="k">nullptr</span><span class="p">);</span>
<span class="k">delete</span><span class="p">[]</span> <span class="n">buffer</span><span class="p">;</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="n">FMOD_SOUND</span> <span class="o">*</span><span class="n">sound</span><span class="p">;</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">length</span><span class="p">;</span>
<span class="kt">char</span> <span class="o">*</span><span class="n">buffer</span><span class="p">;</span>
<span class="n">FMOD_System_CreateSound</span><span class="p">(</span><span class="n">system</span><span class="p">,</span> <span class="s">&quot;drumloop.wav&quot;</span><span class="p">,</span> <span class="n">FMOD_DEFAULT</span> <span class="o">|</span> <span class="n">FMOD_OPENONLY</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">sound</span><span class="p">);</span>
<span class="n">FMOD_Sound_GetLength</span><span class="p">(</span><span class="n">sound</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">length</span><span class="p">,</span> <span class="n">FMOD_TIMEUNIT_RAWBYTES</span><span class="p">);</span>
<span class="n">buffer</span> <span class="o">=</span> <span class="p">(</span><span class="kt">char</span> <span class="o">*</span><span class="p">)</span><span class="n">malloc</span><span class="p">(</span><span class="n">length</span><span class="p">);</span>
<span class="n">FMOD_Sound_ReadData</span><span class="p">(</span><span class="n">sound</span><span class="p">,</span> <span class="p">(</span><span class="kt">void</span> <span class="o">*</span><span class="p">)</span><span class="n">buffer</span><span class="p">,</span> <span class="n">length</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span>
<span class="n">free</span><span class="p">(</span><span class="n">buffer</span><span class="p">);</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="n">FMOD</span><span class="p">.</span><span class="n">Sound</span> <span class="n">sound</span><span class="p">;</span>
<span class="kt">uint</span> <span class="n">length</span><span class="p">;</span>
<span class="kt">byte</span><span class="p">[]</span> <span class="n">buffer</span><span class="p">;</span>
<span class="n">system</span><span class="p">.</span><span class="n">createSound</span><span class="p">(</span><span class="s">&quot;drumloop.wav&quot;</span><span class="p">,</span> <span class="n">FMOD</span><span class="p">.</span><span class="n">MODE</span><span class="p">.</span><span class="n">DEFAULT</span> <span class="p">|</span> <span class="n">FMOD</span><span class="p">.</span><span class="n">MODE</span><span class="p">.</span><span class="n">OPENONLY</span><span class="p">,</span> <span class="k">out</span> <span class="n">sound</span><span class="p">);</span>
<span class="n">sound</span><span class="p">.</span><span class="n">getLength</span><span class="p">(</span><span class="k">out</span> <span class="n">length</span><span class="p">,</span> <span class="n">FMOD</span><span class="p">.</span><span class="n">TIMEUNIT</span><span class="p">.</span><span class="n">RAWBYTES</span><span class="p">);</span>
<span class="n">buffer</span> <span class="p">=</span> <span class="k">new</span> <span class="kt">byte</span><span class="p">[(</span><span class="kt">int</span><span class="p">)</span><span class="n">length</span><span class="p">];</span>
<span class="n">sound</span><span class="p">.</span><span class="n">readData</span><span class="p">(</span><span class="n">buffer</span><span class="p">);</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="kd">var</span> <span class="nx">sound</span> <span class="o">=</span> <span class="p">{};</span>
<span class="kd">var</span> <span class="nx">length</span> <span class="o">=</span> <span class="p">{};</span>
<span class="kd">var</span> <span class="nx">buffer</span> <span class="o">=</span> <span class="p">{};</span>
<span class="nx">system</span><span class="p">.</span><span class="nx">createSound</span><span class="p">(</span><span class="s2">&quot;drumloop.wav&quot;</span><span class="p">,</span> <span class="nx">FMOD</span><span class="p">.</span><span class="nx">DEFAULT</span> <span class="o">|</span> <span class="nx">FMOD</span><span class="p">.</span><span class="nx">OPENONLY</span><span class="p">,</span> <span class="kc">null</span><span class="p">,</span> <span class="nx">sound</span><span class="p">);</span>
<span class="nx">sound</span> <span class="o">=</span> <span class="nx">sound</span><span class="p">.</span><span class="nx">val</span><span class="p">;</span>
<span class="nx">sound</span><span class="p">.</span><span class="nx">getLength</span><span class="p">(</span><span class="nx">length</span><span class="p">,</span> <span class="nx">FMOD</span><span class="p">.</span><span class="nx">TIMEUNIT_RAWBYTES</span><span class="p">);</span>
<span class="nx">length</span> <span class="o">=</span> <span class="nx">length</span><span class="p">.</span><span class="nx">val</span><span class="p">;</span>
<span class="nx">sound</span><span class="p">.</span><span class="nx">readData</span><span class="p">(</span><span class="nx">buffer</span><span class="p">,</span> <span class="nx">length</span><span class="p">,</span> <span class="kc">null</span><span class="p">);</span>
<span class="nx">buffer</span> <span class="o">=</span> <span class="nx">buffer</span><span class="p">.</span><span class="nx">val</span><span class="p">;</span>
</pre></div>
<p><strong>See Also:</strong> <a class="apilink" href="core-api-common.html#fmod_timeunit">FMOD_TIMEUNIT</a>, <a class="apilink" href="core-api-common.html#fmod_mode">FMOD_MODE</a>, <a class="apilink" href="core-api-sound.html#sound_getlength">Sound::getLength</a>, <a class="apilink" href="core-api-system.html#system_createsound">System::createSound</a></p>
<h2 id="sample-data"><a href="#sample-data">22.34 Sample Data</a></h2>
<p>Sample data is raw (PCM) or a compressed <a href="glossary.html#signal">audio signal</a>, stored as a <a href="glossary.html#sound">sound</a>. Multi-channel PCM sample data (stereo and above) is interleaved, so a 5.1 signal for example has 6 values stored together per sample.</p>
<h3 id="endianness"><a href="#endianness">22.34.1 Endianness</a></h3>
<p>When accessing raw data in a sound, it will be in the native endianness of the platform. See <a class="apilink" href="core-api-sound.html#sound_lock">Sound::lock</a>, <a class="apilink" href="core-api-sound.html#sound_unlock">Sound::unlock</a>.<br />
When a sound file is loaded, FMOD will convert the endian to match the native endian of the platform.</p>
<h3 id="sample-formats"><a href="#sample-formats">22.34.2 Sample Formats</a></h3>
<p>Sample data can come in a variety of PCM bit depths (8,16,24,32) and types (integer, float), or as a compressed bitstream. See <a class="apilink" href="core-api-sound.html#fmod_sound_format">FMOD_SOUND_FORMAT</a>.</p>
<h3 id="samples-vs-bytes-vs-milliseconds"><a href="#samples-vs-bytes-vs-milliseconds">22.34.3 Samples vs Bytes vs Milliseconds</a></h3>
<p>Within FMOD functions you will see references to PCM samples, bytes and milliseconds.</p>
<p>To understand what the difference is a diagram has been provided to show how raw PCM sample data is stored in FMOD buffers.</p>
<p><img alt="Samples vs Bytes vs Milliseconds" src="images/samples-bytes-milliseconds.png" /></p>
<p>In this diagram you will see that a stereo sound has its left/right data interleaved one after the other.<br />
A left/right pair (a sound with 2 <strong>channels</strong>) is called a <strong>sample</strong>.<br />
Because this is made up of 16bit data, 1 <strong>sample</strong> = 4 <strong>bytes</strong>.<br />
If the sample rate, or playback rate is 44.1khz, or 44100 samples per second, then <strong>1 sample is 1/44100th of a second</strong>, or <strong>1/44th of a millisecond</strong>. Therefore 44100 samples = 1 second or 1000ms worth of data.<br />
To convert between the different terminologies, the following formulas can be used:</p>
<ul>
<li><strong>ms</strong> = samples * 1000 / samplerate.</li>
<li><strong>samples</strong> = ms * samplerate / 1000.</li>
<li><strong>samplerate</strong> = samples * 1000 / ms.</li>
<li><strong>bytes</strong> = samples * bits * channels / 8.</li>
<li><strong>samples</strong> = bytes * 8 / bits / channels.</li>
</ul>
<p>Some functions like <a class="apilink" href="core-api-sound.html#sound_getlength">Sound::getLength</a> provide the length in milliseconds, bytes and samples to avoid needing to do these calculations.</p>
<h2 id="sample"><a href="#sample">22.35 Sample</a></h2>
<p>Parent topic : <a href="glossary.html#sound">Sound</a></p>
<p>Samples (also referred to as 'decompress into memory' type sounds), are suited for small sounds that need to be played more than once at a time, for example sound effects.</p>
<p>Use <a class="apilink" href="core-api-common.html#fmod_createsample">FMOD_CREATESAMPLE</a> to create a <a class="apilink" href="core-api-sound.html">Sound</a> object in this mode.</p>
<table>
<thead>
<tr>
<th>Sample attributes</th>
<th>Comparison</th>
</tr>
</thead>
<tbody>
<tr>
<td>Decompresses whole sound into memory.</td>
<td>Can use more memory than a <a href="glossary.html#compressed-sample">compressed sample</a> or <a href="glossary.html#stream">stream</a>.</td>
</tr>
<tr>
<td>Low CPU overhead during playback.</td>
<td>Uses less CPU than a <a href="glossary.html#compressed-sample">compressed sample</a> or <a href="glossary.html#stream">stream</a>.</td>
</tr>
<tr>
<td>Slower to load.</td>
<td>Can take longer to load on large sounds than a <a href="glossary.html#compressed-sample">compressed sample</a> or <a href="glossary.html#stream">stream</a>.</td>
</tr>
<tr>
<td>Can play more than 1 at a time.</td>
<td>Better polyphony than a <a href="glossary.html#stream">stream</a>.</td>
</tr>
</tbody>
</table>
<p><strong>Mobile Developers</strong>: A common use for this format is to store files compressed on disk (for faster download speed), then decompress into memory at load time, for lower cpu overhead at run-time.</p>
<h2 id="signal"><a href="#signal">22.36 Signal</a></h2>
<p>The signal is an abstraction of the <a href="glossary.html#sample-data">audio sample data</a> flowing through an FMOD project. Understanding how signals flow through a project is necessary to understand how the <a href="glossary.html#dsp-graph">DSP graph</a> and mixing work.</p>
<p>In most cases, signals originate from <a href="glossary.html#channel">channels</a>, which route their output signals into <a href="glossary.html#channel-group">channel groups</a>. Each channel group creates a submix of all the signals flowing into it. Channels and channel groups may feature <a href="glossary.html#dsp">DSPs</a> that process the signal before passing it to the next DSP in the graph associated with that channel group; when there are no DSPs left in the channel group, the signal is routed from that channel group to that channel group's routing destination. All signals should eventually flow to the master channel group or an audio port supplied by an <a href="core-api-system.html#fmod_outputtype">FMOD_OUTPUTTYPE</a> plug-in.</p>
<h2 id="sound"><a href="#sound">22.37 Sound</a></h2>
<p>A sound is an instance of <a href="glossary.html#sample-data">sample data</a> which can be loaded from media, or created from memory.</p>
<p>When a sound is loaded, it is either decompressed as a static sample into memory as PCM (sample), loaded into memory in its native format and decompressed at runtime (compressed sample), or streamed and decoded in realtime (in chunks) from an external media such as a disk or internet (stream).</p>
<p>For more detail see:</p>
<ul>
<li><a href="glossary.html#sample">Sample</a></li>
<li><a href="glossary.html#stream">Stream</a></li>
<li><a href="glossary.html#compressed-sample">Compressed Sample</a></li>
</ul>
<p>A sound can be created with <a class="apilink" href="core-api-system.html#system_createsound">System::createSound</a> or <a class="apilink" href="core-api-system.html#system_createstream">System::createStream</a> which returns a <a class="apilink" href="core-api-sound.html">Sound</a> object. A <a class="apilink" href="core-api-sound.html">Sound</a> object can be played with <a class="apilink" href="core-api-system.html#system_playsound">System::playSound</a>.</p>
<h2 id="streaming-sample-data"><a href="#streaming-sample-data">22.38 Streaming Sample Data</a></h2>
<p>Streaming sample data is <a href="glossary.html#sample-data">sample data</a> formatted for the <a href="glossary.html#stream">streaming</a> loading mode. The distinction between streaming sample data and non-streaming sample data is only extant when using the Studio API to play content from bank files, as the <a href="glossary.html#loading-mode">loading mode</a> of <a href="glossary.html#asset">assets</a> in a bank file is encoded into that bank file along with those assets. When using the Core API, the loading mode of a sound is specified at run time.</p>
<p>When using the Core API, the <a href="glossary.html#loading-mode">loading mode</a> of a sound is specified at run time.</p>
<p>For more information about streaming, see the <a href="loading-and-playing-sounds-in-the-core-api.html#streams">Streams</a> section of the <a href="loading-and-playing-sounds-in-the-core-api.html">Loading and Playing Sounds in the Core API</a> chapter.</p>
<h2 id="stream"><a href="#stream">22.39 Stream</a></h2>
<p>Parent topic : <a href="glossary.html#sound">Sound</a></p>
<p>A stream is good for a sound that is too large to fit into memory. A stream reads from disk or other media like the internet as it plays.</p>
<p>Typically suited to larger sounds like music, long ambiences, or voice.</p>
<p>Use <a class="apilink" href="core-api-common.html#fmod_createstream">FMOD_CREATESTREAM</a> to create a <a class="apilink" href="core-api-sound.html">Sound</a> object in this mode.</p>
<table>
<thead>
<tr>
<th>'Stream' attributes</th>
<th>Comparison</th>
</tr>
</thead>
<tbody>
<tr>
<td>Uses a small buffer in memory.</td>
<td>Uses less memory than a <a href="glossary.html#sample">sample</a> or <a href="glossary.html#compressed-sample">compressed sample</a> on large sounds.</td>
</tr>
<tr>
<td>Higher CPU overhead during playback.</td>
<td>Uses more CPU than <a href="glossary.html#sample">sample</a>, slightly more than a <a href="glossary.html#compressed-sample">compressed sample</a> due to simultaneous reading from medium.</td>
</tr>
<tr>
<td>Fast to load.</td>
<td>Faster than a <a href="glossary.html#sample">sample</a> on large sounds, possibly faster than a <a href="glossary.html#compressed-sample">compressed sample</a> with very large sounds.</td>
</tr>
<tr>
<td>Can only be played once at a time.</td>
<td>Worse polyphony than a <a href="glossary.html#sample">sample</a> or <a href="glossary.html#compressed-sample">compressed sample</a>.</td>
</tr>
</tbody>
</table>
<p><strong>Note</strong>: A very small sound may use more memory than a <a href="glossary.html#sample">sample</a> or <a href="glossary.html#compressed-sample">compressed sample</a> when created as a stream, due to the stream file/decode buffer overhead being bigger than the size of the sound.</p>
<h3 id="streaming-issues"><a href="#streaming-issues">22.39.1 Streaming Issues</a></h3>
<p><strong>Bandwidth</strong></p>
<p>Streaming audio from a medium should be kept to a limited number of instances, to avoid starvation of data leading to skipping / stuttering audio.</p>
<p>Increasing stream memory buffer sizes can help to mitigate this problem. See <a class="apilink" href="core-api-system.html#system_setstreambuffersize">System::setStreamBufferSize</a> and <a class="apilink" href="core-api-system.html#fmod_advancedsettings_defaultdecodebuffersize">FMOD_ADVANCEDSETTINGS::defaultDecodeBufferSize</a>.</p>
<p><strong>Speed of commands using streams</strong></p>
<p><a class="apilink" href="core-api-system.html#system_createstream">System::createStream</a>, <a class="apilink" href="core-api-channel.html#channel_setposition">Channel::setPosition</a> and <a class="apilink" href="core-api-sound.html#sound_getsubsound">Sound::getSubSound</a> when using a stream can take longer than an in memory sample, as they have to initialize internal buffers and flush them from disk.</p>
<p>Use <a class="apilink" href="core-api-common.html#fmod_nonblocking">FMOD_NONBLOCKING</a> command to remove the cost from the main thread and put the overhead into a background thread.</p>
<p><strong>Setting loop counts or points of a playing stream </strong></p>
<p>Issues with looping streaming sounds may arise when changing the loop count or loop points of a playing stream.</p>
<p>Sounds created with <a class="apilink" href="core-api-system.html#system_createstream">System::createStream</a> or <a class="apilink" href="core-api-common.html#fmod_createstream">FMOD_CREATESTREAM</a> may have executed loop logic and buffered sample data before API calls to change their looping properties. If issues occur after changing loop properties you may need to call <a class="apilink" href="core-api-channel.html#channel_setposition">Channel::setPosition</a> to force a flush of the stream buffer.</p>
<p>Note this will usually only happen if you have sounds or loop regions which are smaller than the stream <em>decode</em> buffer. See <a class="apilink" href="core-api-system.html#fmod_createsoundexinfo">FMOD_CREATESOUNDEXINFO</a>.</p>
<h2 id="string-format"><a href="#string-format">22.40 String Format</a></h2>
<p>All FMOD Public APIs and structures use UTF-8 strings.</p>
<p>As C# uses UTF-16 strings by default, the FMOD C# api function parameters will automatically convert between UTF-16 and UTF-8 strings in any api using the C# "string" type or FMOD's "StringWrapper" type. However, any API that uses strings via an IntPtr will not automatically convert from UTF-16, and will instead expect a UTF-8 string to be used.</p>
<h2 id="studio-api"><a href="#studio-api">22.41 Studio API</a></h2>
<p>The Studio API is a programmer API that allows your game to interact with data-driven projects created in <a href="glossary.html#fmod-studio">FMOD Studio</a> at run time. The Studio API and <a href="glossary.html#core-api">Core API</a> together comprise the <a href="glossary.html#fmod-engine">FMOD Engine</a>.</p>
<p>The Studio API is built on top of the Core API, and extends its functionality. <a href="glossary.html#fmod-studio">FMOD Studio</a> and the Studio API are flexible and powerful enough to suit the audio needs of the vast majority of games. However, if a specific game requires more flexibility than the Studio API provides, we recommend using the Core API instead.</p>
<p>For more information about the Studio API, see the <a href="studio-guide.html">Studio API Guide</a> and <a href="studio-api.html">Studio API Reference</a> chapters.</p>
<h2 id="studio-guids-and-paths"><a href="#studio-guids-and-paths">22.42 Studio GUIDs and Paths</a></h2>
<p>Many functions in the Studio API allow you to identify an object within an <a href="glossary.html#fmod-studio">FMOD Studio</a> project by the object's globally unique identifier, or <a href="glossary.html#guid">GUID</a>. These API functions will accept the GUID in binary format (mostly useful when an object's GUID has been looked up programmatically by name), or as a string formatted as 32 digits separated by hyphens and enclosed in braces: <code>{00000000-0000-0000-0000-000000000000}</code>.</p>
<p>Many functions in the Studio API allow you to identify an object within an FMOD Studio project by the object's path. Objects can only be identified by path if the project's <a href="#studio-strings-bank">strings bank</a> is loaded.</p>
<p>See the <a href="https://fmod.com/docs/2.03/studio">FMOD Studio User Manual</a> for more information.</p>
<h2 id="studio-strings-bank"><a href="#studio-strings-bank">22.43 Studio Strings Bank</a></h2>
<p>When building a <span class="dead-link" href="glossary.html#master-bank">master bank</span class="dead-link">, <a href="glossary.html#fmod-studio">FMOD Studio</a> also writes out a strings bank for the project. The strings bank contains a string table which the <a href="glossary.html#studio-api">Studio API</a> can use to resolve <a href="glossary.html#guid">GUIDs</a> from paths. Studio API functions which accept paths require the project's strings bank to be loaded in order to function correctly.</p>
<h2 id="studio-update-thread"><a href="#studio-update-thread">22.44 Studio Update Thread</a></h2>
<p>A thread created by the <a href="studio-api-system.html">Studio System</a> to perform asynchronous processing of API commands and manage scheduling and playback logic for events. This thread is triggered from the core mixer thread at the period specified in the <a class="apilink" href="studio-api-system.html#fmod_studio_advancedsettings">FMOD_STUDIO_ADVANCEDSETTINGS</a>. If the studio system is initialized with <a class="apilink" href="studio-api-system.html#fmod_studio_init_synchronous_update">FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE</a> then no studio update thread is created.</p>
<h2 id="subsound"><a href="#subsound">22.45 Subsound</a></h2>
<p>A subsound is a one of several distinct, independently playable audio assets that together comprise a loaded or streaming <a href="glossary.html#sound">sound</a>.</p>
<p>To have subsounds, a sound must be in a container format such as FSB, DLS, MOD, S3M, XM, or IT. Sounds in other formats are composed of a single asset, and do not have subsounds.</p>
<p>Because the loading unit for audio assets is the sound, subsounds cannot be loaded independently of their associated sound, and loading a sound loads all of the subsounds of that sound.</p>
<p>Because a stream can only play one asset at a time, a streaming sound with subsounds can only play one of those subsounds at a time. If you want to stream multiple subsounds of a sound at once, you must create a separate streaming sound for each of them.</p>
<h2 id="sync-points"><a href="#sync-points">22.46 Sync Points</a></h2>
<p>A sync point can be used to trigger a callback during playback. See <a class="apilink" href="core-api-channelcontrol.html#fmod_channelcontrol_callback_syncpoint">FMOD_CHANNELCONTROL_CALLBACK_SYNCPOINT</a>.<br />
These points can be user generated via the API or can come from a .wav file with embedded markers.</p>
<p>Markers can be added to a wave file in a sound editor usually by clicking on a waveform or timeline and inserting a 'marker' or 'region'.</p>
<p>Any RIFF based format will support sync points.</p>
<p>Sync points can be manipulated with:</p>
<ul>
<li><a class="apilink" href="core-api-sound.html#sound_addsyncpoint">Sound::addSyncPoint</a></li>
<li><a class="apilink" href="core-api-sound.html#sound_deletesyncpoint">Sound::deleteSyncPoint</a></li>
<li><a class="apilink" href="core-api-sound.html#sound_getnumsyncpoints">Sound::getNumSyncPoints</a></li>
<li><a class="apilink" href="core-api-sound.html#sound_getsyncpoint">Sound::getSyncPoint</a></li>
<li><a class="apilink" href="core-api-sound.html#sound_getsyncpointinfo">Sound::getSyncPointInfo</a></li>
</ul>
<h2 id="system"><a href="#system">22.47 System</a></h2>
<p>This can refer to either the <a href="glossary.html#core-api">Core API</a>'s <a href="core-api-system.html">System</a> class, the <a href="glossary.html#studio-api">Studio API</a>'s <a href="studio-api-system.html">Studio::System</a> class, or an object derived from one of those classes.</p>
<p>The <code>System</code> class is the heart of the <a href="glossary.html#fmod-engine">FMOD Engine</a>. Nearly all Core API features depend on a <code>System</code> object existing, and will not work if it has not yet been created.</p>
<p>The <code>Studio::System</code> class is built on top of the <code>System</code> class. Nearly all <a href="glossary.html#studio-api">Studio API</a> features depend on a <code>Studio::System</code> object existing, and will not work if it has not yet been created.</p>
<p>Your game should create a <code>Studio::System</code> object if it uses the Studio API. If your game uses only the Core API, it should create a <code>System</code> object instead.</p>
<p>For information about using the Core API's <code>System</code> class, see the <a href="running-the-core-api.html">Core API Getting Started</a> chapter. For more information about using the Studio API's <code>Studio::System</code> class, see the <a href="studio-api-getting-started.html">Studio API Getting Started</a> chapter.</p>
<h2 id="up-mixing"><a href="#up-mixing">22.48 Up Mixing</a></h2>
<p>When the source <a href="glossary.html#signal">signal</a> channel count is lower than the destination, it will distribute its lower channel information into the higher speaker mode's channels.<br />
This example is a table of the different source signal speaker modes, mapping to a 7.1 output. Values in table represent attenuation. 0dB = full volume, - = silence.</p>
<pre><code>Key: M = Mono, L = Left, R = Right, FL = Front Left, FR = Front Right, C = Center, LFE = Low Frequency Emitter, SL = Surround Left, SR = Surround Right, BL = Back Left, BR = Back Right
</code></pre>
<table>
<thead>
<tr>
<th>Output Speaker</th>
<th>Mono source</th>
<th>Stereo source</th>
<th>Quad source</th>
<th>5.0 source</th>
<th>5.1 source</th>
<th>7.1 source</th>
</tr>
</thead>
<tbody>
<tr>
<td>Front left</td>
<td>M = -3dB</td>
<td>L = 0dB</td>
<td>FL = 0dB</td>
<td>FL = 0dB</td>
<td>FL = 0dB</td>
<td>FL = 0dB</td>
</tr>
<tr>
<td>Front right</td>
<td>M = -3dB</td>
<td>R = 0dB</td>
<td>FR = 0dB</td>
<td>FR = 0dB</td>
<td>FR = 0dB</td>
<td>FR = 0dB</td>
</tr>
<tr>
<td>Center</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>C = 0dB</td>
<td>C = 0dB</td>
<td>C = 0dB</td>
</tr>
<tr>
<td>LFE</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>LFE = 0dB</td>
<td>LFE = 0dB</td>
</tr>
<tr>
<td>Surround left</td>
<td>-</td>
<td>-</td>
<td>SL = 0dB</td>
<td>SL = 0dB</td>
<td>SL = 0dB</td>
<td>SL = 0dB</td>
</tr>
<tr>
<td>Surround right</td>
<td>-</td>
<td>-</td>
<td>SR = 0dB</td>
<td>SR = 0dB</td>
<td>SR = 0dB</td>
<td>SR = 0dB</td>
</tr>
<tr>
<td>Back left</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>BL = 0dB</td>
</tr>
<tr>
<td>Back right</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>BR = 0dB</td>
</tr>
</tbody>
</table>
<p><em>Example of lower and equal speaker modes up mixing to a target speaker mode = 7.1</em></p>
<h2 id="user-data"><a href="#user-data">22.49 User Data</a></h2>
<p>User data is arbitrary data that can be attached to various FMOD objects. User data is stored without a type, in the form of a <code>void *</code> in C/C++, <code>IntPtr</code> in C# or an object in javascript. User data can then be retrieved and cast back to the original type. The following shows how to set and get user data on a <a class="apilink" href="core-api-sound.html">Sound</a>, but can be likewise applied to any object with a <code>getUserData</code> or <code>setUserData</code> method.</p>
<p>
<div class="language-selector">
<div class="language-tab" data-language="language-c">C</div>
<div class="language-tab" data-language="language-cpp">C++</div>
<div class="language-tab" data-language="language-csharp">C#</div>
<div class="language-tab" data-language="language-javascript">JS</div>
</div>
</p>
<div class="highlight language-cpp"><pre><span></span><span class="p">{</span>
<span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">userData</span> <span class="o">=</span> <span class="s">&quot;Hello User Data!&quot;</span><span class="p">;</span>
<span class="kt">void</span> <span class="o">*</span><span class="n">pointer</span> <span class="o">=</span> <span class="p">(</span><span class="kt">void</span> <span class="o">*</span><span class="p">)</span><span class="n">userData</span><span class="p">;</span>
<span class="n">sound</span><span class="o">-&gt;</span><span class="n">setUserData</span><span class="p">(</span><span class="n">pointer</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">{</span>
<span class="kt">void</span> <span class="o">*</span><span class="n">pointer</span><span class="p">;</span>
<span class="n">sound</span><span class="o">-&gt;</span><span class="n">getUserData</span><span class="p">(</span><span class="o">&amp;</span><span class="n">pointer</span><span class="p">);</span>
<span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">userData</span> <span class="o">=</span> <span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="p">)</span><span class="n">pointer</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
<div class="highlight language-c"><pre><span></span><span class="p">{</span>
<span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">userData</span> <span class="o">=</span> <span class="s">&quot;Hello User Data!&quot;</span><span class="p">;</span>
<span class="kt">void</span> <span class="o">*</span><span class="n">pointer</span> <span class="o">=</span> <span class="p">(</span><span class="kt">void</span> <span class="o">*</span><span class="p">)</span><span class="n">userData</span><span class="p">;</span>
<span class="n">FMOD_Sound_SetUserData</span><span class="p">(</span><span class="n">object</span><span class="p">,</span> <span class="n">pointer</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">{</span>
<span class="kt">void</span> <span class="o">*</span><span class="n">pointer</span><span class="p">;</span>
<span class="n">FMOD_Sound_GetUserData</span><span class="p">(</span><span class="n">object</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">pointer</span><span class="p">);</span>
<span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">userData</span> <span class="o">=</span> <span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="p">)</span><span class="n">pointer</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
<div class="highlight language-csharp"><pre><span></span><span class="p">{</span>
<span class="kt">string</span> <span class="n">userData</span> <span class="p">=</span> <span class="s">&quot;Hello User Data!&quot;</span><span class="p">;</span>
<span class="n">GCHandle</span> <span class="n">handle</span> <span class="p">=</span> <span class="n">GCHandle</span><span class="p">.</span><span class="n">Alloc</span><span class="p">(</span><span class="n">userData</span><span class="p">);</span>
<span class="n">IntPtr</span> <span class="n">pointer</span> <span class="p">=</span> <span class="n">GCHandle</span><span class="p">.</span><span class="n">ToIntPtr</span><span class="p">(</span><span class="n">handle</span><span class="p">);</span>
<span class="n">sound</span><span class="p">.</span><span class="n">setUserData</span><span class="p">(</span><span class="n">pointer</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">{</span>
<span class="n">IntPtr</span> <span class="n">pointer</span><span class="p">;</span>
<span class="n">sound</span><span class="p">.</span><span class="n">getUserData</span><span class="p">(</span><span class="k">out</span> <span class="n">pointer</span><span class="p">);</span>
<span class="n">GCHandle</span> <span class="n">handle</span> <span class="p">=</span> <span class="n">GCHandle</span><span class="p">.</span><span class="n">FromIntPtr</span><span class="p">(</span><span class="n">pointer</span><span class="p">);</span>
<span class="kt">string</span> <span class="n">userData</span> <span class="p">=</span> <span class="n">handle</span><span class="p">.</span><span class="n">Target</span> <span class="k">as</span> <span class="kt">string</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
<div class="highlight language-javascript"><pre><span></span><span class="p">{</span>
<span class="kd">var</span> <span class="nx">userData</span> <span class="o">=</span> <span class="s2">&quot;Hello User Data!&quot;</span><span class="p">;</span>
<span class="nx">sound</span><span class="p">.</span><span class="nx">setUserData</span><span class="p">(</span><span class="nx">userData</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">{</span>
<span class="kd">var</span> <span class="nx">outval</span> <span class="o">=</span> <span class="p">{};</span>
<span class="nx">sound</span><span class="p">.</span><span class="nx">getUserData</span><span class="p">(</span><span class="nx">outval</span><span class="p">);</span>
<span class="kd">var</span> <span class="nx">userData</span> <span class="o">=</span> <span class="nx">outval</span><span class="p">.</span><span class="nx">val</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
<h2 id="version"><a href="#version">22.50 Version</a></h2>
<p>The version number of an FMOD product. Version numbers are split into three parts, in the format: <em>productVersion</em>.<em>majorVersion</em>.<em>minorVersion</em>. For example, the version 1.23.45 would indicate product version 1, major version 23, and minor version 45 of that major version.</p>
<p>Major versions contain significant changes, add new features, and may affect bank compatibility. Updating to a new major version usually requires project migration. New major versions may change playback behavior in some cases.</p>
<p>Minor versions, also known as patch versions, contain bug fixes and smaller workflow improvements.</p>
<p>Built <a href="glossary.html#bank-file">bank files</a> are compatible with any version of the <a href="glossary.html#fmod-engine">FMOD Engine</a> with the same major and product version numbers as the version of <a href="glossary.html#fmod-studio">FMOD Studio</a> used to create them. For example, a bank built in FMOD Studio version 2.00.03 is fully compatible with FMOD Engine versions 2.00.03, 2.00.00, and 2.00.10, but not with versions 1.10.14, 1.00.03, and 2.01.03.</p>
<p>In addition, a bank built by a given major version of FMOD Studio can be loaded by any later major version of the FMOD Engine. However, because new major engine versions frequently include minor changes to behavior, banks loaded in later major versions may behave exhibit small changes in bahvior in some circumstances. For example, banks created in FMOD Studio version 1.10.xx can be loaded in FMOD Engine versions 2.00.xx or 2.01.xx, but might sound slightly different in those versions than in 1.10.xx.</p></div>
<p class="manual-footer">FMOD Engine User Manual 2.03.13 (2026-03-31). &copy; 2026 Firelight Technologies Pty Ltd.</p>
</div>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 325 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 24 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 85 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 27 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 103 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 51 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.9 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 65 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 84 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 146 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 88 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 74 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 89 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 18 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 76 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 63 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

@@ -0,0 +1 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="330.31" height="75.896" viewBox="0 0 330.31 75.896"><defs><style>.cls-1{fill:none;stroke:#000;stroke-miterlimit:10;}</style></defs><path d="M279.685,42H275.4l-6.719,6.225V27.371l6.745,6.225h4.264Z"/><path d="M50.625,33.6h4.29l6.719-6.225V48.225L54.889,42H50.625Z"/><path d="M41.576,39.875a2.532,2.532,0,0,1-.013.285.951.951,0,0,1-.043.192.256.256,0,0,1-.07.111.16.16,0,0,1-.1.033H38a.459.459,0,0,1-.313-.11.448.448,0,0,1-.127-.358V33.4a.16.16,0,0,1,.037-.1.246.246,0,0,1,.121-.073,1.168,1.168,0,0,1,.229-.045,3.81,3.81,0,0,1,.719,0,1.162,1.162,0,0,1,.226.045.259.259,0,0,1,.122.073.159.159,0,0,1,.036.1v5.876h2.3a.171.171,0,0,1,.1.031.232.232,0,0,1,.07.1.828.828,0,0,1,.043.186A2.544,2.544,0,0,1,41.576,39.875Z"/><path d="M293.546,40.3a.221.221,0,0,1-.022.1.178.178,0,0,1-.108.07,1.05,1.05,0,0,1-.248.04c-.109.008-.258.011-.446.011-.157,0-.284,0-.378-.011a.894.894,0,0,1-.223-.042.257.257,0,0,1-.116-.079.446.446,0,0,1-.055-.116l-.656-1.631q-.119-.278-.231-.492a1.562,1.562,0,0,0-.251-.358.945.945,0,0,0-.319-.218,1.106,1.106,0,0,0-.418-.073h-.463v2.783a.161.161,0,0,1-.036.1.266.266,0,0,1-.123.073,1.1,1.1,0,0,1-.225.045,2.974,2.974,0,0,1-.361.017,3.016,3.016,0,0,1-.359-.017,1.14,1.14,0,0,1-.228-.045.241.241,0,0,1-.119-.073.171.171,0,0,1-.034-.1V33.66a.452.452,0,0,1,.127-.359.465.465,0,0,1,.314-.109h1.89c.193,0,.351,0,.475.011s.237.017.339.028a3.141,3.141,0,0,1,.793.214,1.924,1.924,0,0,1,.6.4,1.676,1.676,0,0,1,.375.582,2.117,2.117,0,0,1,.13.77,2.3,2.3,0,0,1-.092.669,1.732,1.732,0,0,1-.275.54,1.794,1.794,0,0,1-.445.412,2.425,2.425,0,0,1-.605.282,1.689,1.689,0,0,1,.308.192,1.6,1.6,0,0,1,.271.274,2.76,2.76,0,0,1,.24.366,4.764,4.764,0,0,1,.22.466l.616,1.44c.056.143.093.247.112.313A.6.6,0,0,1,293.546,40.3Zm-1.913-4.956a1.087,1.087,0,0,0-.164-.61.894.894,0,0,0-.536-.35,1.969,1.969,0,0,0-.257-.045,3.67,3.67,0,0,0-.4-.017h-.666V36.4h.756a1.8,1.8,0,0,0,.553-.076,1.122,1.122,0,0,0,.4-.215.882.882,0,0,0,.237-.33A1.112,1.112,0,0,0,291.633,35.348Z"/><circle cx="165.155" cy="37.798" r="5.54"/><line class="cls-1" x1="77.931" y1="37.948" x2="252.379" y2="37.948"/></svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.8 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 22 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 22 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 23 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 22 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 17 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 90 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 76 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" width="275" height="275" viewBox="0 0 275 275"><defs><style>.cls-1{stroke:#e1e1e1;}.cls-1,.cls-2,.cls-3,.cls-4,.cls-5,.cls-6,.cls-7{fill:none;stroke-miterlimit:10;}.cls-2{stroke-dasharray:0 0 3.02 3.02;}.cls-2,.cls-3,.cls-5{stroke:#b3b3b3;}.cls-3{stroke-width:3px;}.cls-8{fill:#666;font-size:11.56px;}.cls-8,.cls-9{font-family:Calibri-Bold, Calibri;font-weight:700;}.cls-10{letter-spacing:0em;}.cls-11{letter-spacing:0em;}.cls-12,.cls-13{stroke-width:0px;}.cls-4{stroke:red;stroke-width:2px;}.cls-14{letter-spacing:-.01em;}.cls-13{fill:#202020;}.cls-9{font-size:12px;}.cls-6,.cls-7{stroke:gray;}.cls-7{stroke-dasharray:0 0 2.97 2.97;}</style></defs><line class="cls-5" x1="157.52" y1="113.18" x2="158.57" y2="112.11"/><line class="cls-2" x1="160.68" y1="109.95" x2="227.12" y2="41.89"/><line class="cls-5" x1="228.17" y1="40.81" x2="229.22" y2="39.74"/><line class="cls-1" x1="31.68" y1="241.17" x2="241.35" y2="241.17"/><line class="cls-1" x1="31.68" y1="222.88" x2="229.22" y2="222.88"/><line class="cls-1" x1="31.68" y1="204.58" x2="229.22" y2="204.58"/><line class="cls-1" x1="31.68" y1="186.29" x2="229.22" y2="186.29"/><line class="cls-1" x1="31.68" y1="167.99" x2="229.22" y2="167.99"/><line class="cls-1" x1="31.68" y1="149.69" x2="229.22" y2="149.69"/><line class="cls-1" x1="31.68" y1="131.4" x2="229.22" y2="131.4"/><line class="cls-1" x1="31.68" y1="113.1" x2="229.22" y2="113.1"/><line class="cls-1" x1="31.68" y1="94.81" x2="229.22" y2="94.81"/><line class="cls-1" x1="31.68" y1="76.51" x2="229.22" y2="76.51"/><line class="cls-1" x1="31.68" y1="58.21" x2="229.22" y2="58.21"/><line class="cls-1" x1="103.83" y1="38.74" x2="103.83" y2="240"/><line class="cls-1" x1="211.45" y1="39.92" x2="211.45" y2="241.17"/><line class="cls-1" x1="193.48" y1="39.92" x2="193.48" y2="241.17"/><line class="cls-1" x1="175.5" y1="39.92" x2="175.5" y2="241.17"/><line class="cls-1" x1="157.52" y1="39.92" x2="157.52" y2="241.17"/><line class="cls-1" x1="139.55" y1="39.92" x2="139.55" y2="241.17"/><line class="cls-1" x1="121.57" y1="39.92" x2="121.57" y2="241.17"/><line class="cls-3" x1="229.22" y1="39.74" x2="229.22" y2="241"/><line class="cls-1" x1="85.61" y1="39.92" x2="85.61" y2="241.17"/><line class="cls-1" x1="67.64" y1="39.92" x2="67.64" y2="241.17"/><line class="cls-1" x1="49.66" y1="39.92" x2="49.66" y2="241.17"/><text class="cls-9" transform="translate(229.22 259.47)"><tspan x="0" y="0">Input</tspan></text><text class="cls-9" transform="translate(16.12 26.38)"><tspan x="0" y="0">Output</tspan></text><line class="cls-12" x1="31.68" y1="242.08" x2="248.64" y2="242.08"/><polygon class="cls-13" points="31.68 243.27 242.94 243.27 242.94 245.37 248.64 242.08 242.94 238.79 242.94 240.89 31.68 240.89 31.68 243.27"/><text class="cls-8" transform="translate(34.5 111.37)"><tspan x="0" y="0">Th</tspan><tspan class="cls-14" x="11.93" y="0">r</tspan><tspan x="15.91" y="0">eshold</tspan></text><text class="cls-8" transform="translate(190.17 94.81)"><tspan x="0" y="0">R</tspan><tspan class="cls-11" x="6.51" y="0">a</tspan><tspan class="cls-10" x="12.11" y="0">tio</tspan></text><path class="cls-6" d="M181.37,89.06c.27-.13,11.74,4.4,5.79,15.31"/><line class="cls-6" x1="31.68" y1="113.1" x2="33.18" y2="113.1"/><line class="cls-7" x1="36.15" y1="113.1" x2="224.71" y2="113.1"/><line class="cls-6" x1="226.19" y1="113.1" x2="227.69" y2="113.1"/><line class="cls-12" x1="31.68" y1="242.08" x2="31.68" y2="30.55"/><polygon class="cls-13" points="32.87 242.08 32.87 36.25 34.97 36.25 31.68 30.55 28.39 36.25 30.49 36.25 30.49 242.08 32.87 242.08"/><line class="cls-4" x1="31.68" y1="242.08" x2="157.52" y2="113.18"/><line class="cls-4" x1="157.06" y1="113.45" x2="229.22" y2="94.81"/></svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" width="275" height="275" viewBox="0 0 275 275"><defs><style>.cls-1{stroke:#e1e1e1;}.cls-1,.cls-2,.cls-3,.cls-4,.cls-5,.cls-6,.cls-7{fill:none;stroke-miterlimit:10;}.cls-2{stroke-dasharray:0 0 2.99 2.99;}.cls-2,.cls-3,.cls-5{stroke:#b3b3b3;}.cls-3{stroke-width:3px;}.cls-8{fill:#666;font-size:11.56px;}.cls-8,.cls-9{font-family:Calibri-Bold, Calibri;font-weight:700;}.cls-10{letter-spacing:0em;}.cls-11{letter-spacing:0em;}.cls-12,.cls-13{stroke-width:0px;}.cls-4{stroke:red;stroke-width:2px;}.cls-14{letter-spacing:-.01em;}.cls-13{fill:#202020;}.cls-9{font-size:12px;}.cls-6,.cls-7{stroke:gray;}.cls-7{stroke-dasharray:0 0 2.97 2.97;}</style></defs><line class="cls-5" x1="31.68" y1="241.17" x2="32.73" y2="240.1"/><line class="cls-2" x1="34.83" y1="237.97" x2="155.19" y2="115.35"/><line class="cls-5" x1="156.24" y1="114.28" x2="157.29" y2="113.21"/><line class="cls-1" x1="31.68" y1="241.17" x2="241.35" y2="241.17"/><line class="cls-1" x1="31.68" y1="222.88" x2="229.22" y2="222.88"/><line class="cls-1" x1="31.68" y1="204.58" x2="229.22" y2="204.58"/><line class="cls-1" x1="31.68" y1="186.29" x2="229.22" y2="186.29"/><line class="cls-1" x1="31.68" y1="167.99" x2="229.22" y2="167.99"/><line class="cls-1" x1="31.68" y1="149.69" x2="229.22" y2="149.69"/><line class="cls-1" x1="31.68" y1="131.4" x2="229.22" y2="131.4"/><line class="cls-1" x1="31.68" y1="113.1" x2="229.22" y2="113.1"/><line class="cls-1" x1="31.68" y1="94.81" x2="229.22" y2="94.81"/><line class="cls-1" x1="31.68" y1="76.51" x2="229.22" y2="76.51"/><line class="cls-1" x1="31.68" y1="58.21" x2="229.22" y2="58.21"/><line class="cls-1" x1="103.83" y1="38.74" x2="103.83" y2="240"/><line class="cls-1" x1="211.45" y1="39.92" x2="211.45" y2="241.17"/><line class="cls-1" x1="193.48" y1="39.92" x2="193.48" y2="241.17"/><line class="cls-1" x1="175.5" y1="39.92" x2="175.5" y2="241.17"/><line class="cls-1" x1="157.52" y1="39.92" x2="157.52" y2="241.17"/><line class="cls-1" x1="139.55" y1="39.92" x2="139.55" y2="241.17"/><line class="cls-1" x1="121.57" y1="39.92" x2="121.57" y2="241.17"/><line class="cls-1" x1="85.61" y1="39.92" x2="85.61" y2="241.17"/><line class="cls-1" x1="67.64" y1="39.92" x2="67.64" y2="241.17"/><line class="cls-1" x1="49.66" y1="39.92" x2="49.66" y2="241.17"/><line class="cls-3" x1="229.22" y1="39.74" x2="229.22" y2="241"/><text class="cls-9" transform="translate(229.22 259.47)"><tspan x="0" y="0">Input</tspan></text><text class="cls-9" transform="translate(16.12 26.38)"><tspan x="0" y="0">Output</tspan></text><polygon class="cls-13" points="31.68 243.27 242.94 243.27 242.94 245.37 248.64 242.08 242.94 238.79 242.94 240.89 31.68 240.89 31.68 243.27"/><text class="cls-8" transform="translate(34.23 110.33)"><tspan x="0" y="0">Th</tspan><tspan class="cls-14" x="11.93" y="0">r</tspan><tspan x="15.91" y="0">eshold</tspan></text><text class="cls-8" transform="translate(96.95 137.52)"><tspan x="0" y="0">R</tspan><tspan class="cls-11" x="6.51" y="0">a</tspan><tspan class="cls-10" x="12.11" y="0">tio</tspan></text><path class="cls-6" d="M133.45,137.5c-.28.29-15.43-1.68-11.88-19.12"/><line class="cls-6" x1="31.68" y1="113.1" x2="33.18" y2="113.1"/><line class="cls-7" x1="36.15" y1="113.1" x2="224.71" y2="113.1"/><line class="cls-6" x1="226.19" y1="113.1" x2="227.69" y2="113.1"/><line class="cls-4" x1="230.09" y1="40.61" x2="156.73" y2="113.49"/><line class="cls-4" x1="31.68" y1="131.4" x2="157.29" y2="113.21"/><line class="cls-12" x1="31.68" y1="242.08" x2="31.68" y2="30.55"/><polygon class="cls-13" points="32.87 242.08 32.87 36.25 34.97 36.25 31.68 30.55 28.39 36.25 30.49 36.25 30.49 242.08 32.87 242.08"/></svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" width="275" height="275" viewBox="0 0 275 275"><defs><style>.cls-1{stroke:#e1e1e1;}.cls-1,.cls-2,.cls-3,.cls-4,.cls-5,.cls-6,.cls-7{fill:none;stroke-miterlimit:10;}.cls-2{stroke-width:3px;}.cls-2,.cls-4,.cls-5{stroke:#b3b3b3;}.cls-8{fill:#666;font-size:11.56px;}.cls-8,.cls-9{font-family:Calibri-Bold, Calibri;font-weight:700;}.cls-10{letter-spacing:0em;}.cls-11{letter-spacing:0em;}.cls-12,.cls-13{stroke-width:0px;}.cls-3{stroke:red;stroke-width:2px;}.cls-5{stroke-dasharray:0 0 2.99 2.99;}.cls-14{letter-spacing:-.01em;}.cls-13{fill:#202020;}.cls-9{font-size:12px;}.cls-6,.cls-7{stroke:gray;}.cls-7{stroke-dasharray:0 0 2.97 2.97;}</style></defs><line class="cls-4" x1="31.68" y1="241.17" x2="32.73" y2="240.1"/><line class="cls-5" x1="34.83" y1="237.97" x2="155.42" y2="115.32"/><line class="cls-4" x1="156.47" y1="114.25" x2="157.52" y2="113.18"/><line class="cls-1" x1="31.68" y1="241.17" x2="241.35" y2="241.17"/><line class="cls-1" x1="31.68" y1="222.88" x2="229.22" y2="222.88"/><line class="cls-1" x1="31.68" y1="204.58" x2="229.22" y2="204.58"/><line class="cls-1" x1="31.68" y1="186.29" x2="229.22" y2="186.29"/><line class="cls-1" x1="31.68" y1="167.99" x2="229.22" y2="167.99"/><line class="cls-1" x1="31.68" y1="149.69" x2="229.22" y2="149.69"/><line class="cls-1" x1="31.68" y1="131.4" x2="229.22" y2="131.4"/><line class="cls-1" x1="31.68" y1="113.1" x2="229.22" y2="113.1"/><line class="cls-1" x1="31.68" y1="94.81" x2="229.22" y2="94.81"/><line class="cls-1" x1="31.68" y1="76.51" x2="229.22" y2="76.51"/><line class="cls-1" x1="31.68" y1="58.21" x2="229.22" y2="58.21"/><line class="cls-1" x1="103.83" y1="38.74" x2="103.83" y2="240"/><line class="cls-1" x1="211.45" y1="39.92" x2="211.45" y2="241.17"/><line class="cls-1" x1="193.48" y1="39.92" x2="193.48" y2="241.17"/><line class="cls-1" x1="175.5" y1="39.92" x2="175.5" y2="241.17"/><line class="cls-1" x1="157.52" y1="39.92" x2="157.52" y2="241.17"/><line class="cls-1" x1="139.55" y1="39.92" x2="139.55" y2="241.17"/><line class="cls-1" x1="121.57" y1="39.92" x2="121.57" y2="241.17"/><line class="cls-2" x1="229.22" y1="39.74" x2="229.22" y2="241"/><line class="cls-1" x1="85.61" y1="39.92" x2="85.61" y2="241.17"/><line class="cls-1" x1="67.64" y1="39.92" x2="67.64" y2="241.17"/><line class="cls-1" x1="49.66" y1="39.92" x2="49.66" y2="241.17"/><text class="cls-9" transform="translate(229.22 259.47)"><tspan x="0" y="0">Input</tspan></text><text class="cls-9" transform="translate(16.12 26.38)"><tspan x="0" y="0">Output</tspan></text><line class="cls-12" x1="31.68" y1="242.08" x2="248.64" y2="242.08"/><polygon class="cls-13" points="31.68 243.27 242.94 243.27 242.94 245.37 248.64 242.08 242.94 238.79 242.94 240.89 31.68 240.89 31.68 243.27"/><text class="cls-8" transform="translate(34.85 109.43)"><tspan x="0" y="0">Th</tspan><tspan class="cls-14" x="11.93" y="0">r</tspan><tspan x="15.91" y="0">eshold</tspan></text><text class="cls-8" transform="translate(123.28 163.55)"><tspan x="0" y="0">R</tspan><tspan class="cls-11" x="6.51" y="0">a</tspan><tspan class="cls-10" x="12.11" y="0">tio</tspan></text><path class="cls-6" d="M131.38,140.54c-.29.28,1.68,15.3,19.12,11.78"/><line class="cls-6" x1="31.68" y1="113.1" x2="33.18" y2="113.1"/><line class="cls-7" x1="36.15" y1="113.1" x2="224.71" y2="113.1"/><line class="cls-6" x1="226.19" y1="113.1" x2="227.69" y2="113.1"/><line class="cls-12" x1="31.68" y1="242.08" x2="31.68" y2="30.55"/><polygon class="cls-13" points="32.87 242.08 32.87 36.25 34.97 36.25 31.68 30.55 28.39 36.25 30.49 36.25 30.49 242.08 32.87 242.08"/><line class="cls-3" x1="139.55" y1="241.17" x2="157.52" y2="113.18"/><line class="cls-3" x1="157.24" y1="113.74" x2="230.09" y2="40.61"/></svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" width="275" height="275" viewBox="0 0 275 275"><defs><style>.cls-1{stroke-dasharray:0 0 3.02 3.02;}.cls-1,.cls-2,.cls-3,.cls-4,.cls-5,.cls-6,.cls-7{fill:none;stroke-miterlimit:10;}.cls-1,.cls-3,.cls-5{stroke:#b3b3b3;}.cls-2{stroke:#e1e1e1;}.cls-3{stroke-width:3px;}.cls-8{fill:#666;font-size:11.56px;}.cls-8,.cls-9{font-family:Calibri-Bold, Calibri;font-weight:700;}.cls-10{letter-spacing:0em;}.cls-11{letter-spacing:0em;}.cls-12,.cls-13{stroke-width:0px;}.cls-4{stroke:red;stroke-width:2px;}.cls-14{letter-spacing:-.01em;}.cls-13{fill:#202020;}.cls-9{font-size:12px;}.cls-6,.cls-7{stroke:gray;}.cls-7{stroke-dasharray:0 0 2.97 2.97;}</style></defs><line class="cls-5" x1="157.52" y1="113.18" x2="158.57" y2="112.11"/><line class="cls-1" x1="160.68" y1="109.95" x2="227.12" y2="41.89"/><line class="cls-5" x1="228.17" y1="40.81" x2="229.22" y2="39.74"/><line class="cls-2" x1="31.68" y1="241.17" x2="241.35" y2="241.17"/><line class="cls-2" x1="31.68" y1="222.88" x2="229.22" y2="222.88"/><line class="cls-2" x1="31.68" y1="204.58" x2="229.22" y2="204.58"/><line class="cls-2" x1="31.68" y1="186.29" x2="229.22" y2="186.29"/><line class="cls-2" x1="31.68" y1="167.99" x2="229.22" y2="167.99"/><line class="cls-2" x1="31.68" y1="149.69" x2="229.22" y2="149.69"/><line class="cls-2" x1="31.68" y1="131.4" x2="229.22" y2="131.4"/><line class="cls-2" x1="31.68" y1="113.1" x2="229.22" y2="113.1"/><line class="cls-2" x1="31.68" y1="94.81" x2="229.22" y2="94.81"/><line class="cls-2" x1="31.68" y1="76.51" x2="229.22" y2="76.51"/><line class="cls-2" x1="31.68" y1="58.21" x2="229.22" y2="58.21"/><line class="cls-2" x1="103.83" y1="38.74" x2="103.83" y2="240"/><line class="cls-2" x1="211.45" y1="39.92" x2="211.45" y2="241.17"/><line class="cls-2" x1="193.48" y1="39.92" x2="193.48" y2="241.17"/><line class="cls-2" x1="175.5" y1="39.92" x2="175.5" y2="241.17"/><line class="cls-2" x1="157.52" y1="39.92" x2="157.52" y2="241.17"/><line class="cls-2" x1="139.55" y1="39.92" x2="139.55" y2="241.17"/><line class="cls-2" x1="121.57" y1="39.92" x2="121.57" y2="241.17"/><line class="cls-3" x1="229.22" y1="39.74" x2="229.22" y2="241"/><line class="cls-2" x1="85.61" y1="39.92" x2="85.61" y2="241.17"/><line class="cls-2" x1="67.64" y1="39.92" x2="67.64" y2="241.17"/><line class="cls-2" x1="49.66" y1="39.92" x2="49.66" y2="241.17"/><text class="cls-9" transform="translate(229.22 259.47)"><tspan x="0" y="0">Input</tspan></text><text class="cls-9" transform="translate(16.12 26.38)"><tspan x="0" y="0">Output</tspan></text><line class="cls-12" x1="31.68" y1="242.08" x2="248.64" y2="242.08"/><polygon class="cls-13" points="31.68 243.27 242.94 243.27 242.94 245.37 248.64 242.08 242.94 238.79 242.94 240.89 31.68 240.89 31.68 243.27"/><text class="cls-8" transform="translate(34.5 110.15)"><tspan x="0" y="0">Th</tspan><tspan class="cls-14" x="11.93" y="0">r</tspan><tspan x="15.91" y="0">eshold</tspan></text><text class="cls-8" transform="translate(170.63 72.83)"><tspan x="0" y="0">R</tspan><tspan class="cls-11" x="6.51" y="0">a</tspan><tspan class="cls-10" x="12.11" y="0">tio</tspan></text><path class="cls-6" d="M167.76,77.81c.18-.25,12.41-1.74,12.4,10.69"/><line class="cls-6" x1="31.68" y1="113.1" x2="33.18" y2="113.1"/><line class="cls-7" x1="36.15" y1="113.1" x2="224.71" y2="113.1"/><line class="cls-6" x1="226.19" y1="113.1" x2="227.69" y2="113.1"/><line class="cls-12" x1="31.68" y1="242.08" x2="31.68" y2="30.55"/><polygon class="cls-13" points="32.87 242.08 32.87 36.25 34.97 36.25 31.68 30.55 28.39 36.25 30.49 36.25 30.49 242.08 32.87 242.08"/><line class="cls-4" x1="31.68" y1="242.08" x2="157.52" y2="113.18"/><line class="cls-4" x1="157.27" y1="113.64" x2="175.5" y2="39.92"/></svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Some files were not shown because too many files have changed in this diff Show More