commit c6fdbf872ad2985ee2463e869741fc362e13c848
parent 737115ae76a0eec7cd77b5b5b1c93e9aff51f7e5
Author: Alexandre Bique <bique.alexandre@gmail.com>
Date: Tue, 21 Oct 2014 10:04:54 +0200
Improve iframe
Diffstat:
M | index.html | | | 4 | ++-- |
M | spec.html | | | 198 | +++++++++++++++++++++++++++++++++++++++++-------------------------------------- |
2 files changed, 104 insertions(+), 98 deletions(-)
diff --git a/index.html b/index.html
@@ -3,7 +3,7 @@
</head>
<body>
- <iframe src="spec.html" height="100%" width="49.5%"></iframe>
- <iframe src="spec.html#references" height="100%" width="49.5%"></iframe>
+ <iframe src="spec.html" height="95%" width="49.5%"></iframe>
+ <iframe src="spec.html#references" height="95%" width="49.5%"></iframe>
</body>
</html>
diff --git a/spec.html b/spec.html
@@ -113,78 +113,79 @@ tt.docutils {
</ul>
</li>
<li><a class="reference internal" href="#specification" id="id5">Specification</a><ul>
-<li><a class="reference internal" href="#encoding" id="id6">Encoding</a></li>
-<li><a class="reference internal" href="#plugins-location" id="id7">Plugins location</a><ul>
-<li><a class="reference internal" href="#common" id="id8">Common</a></li>
-<li><a class="reference internal" href="#linux" id="id9">Linux</a></li>
-<li><a class="reference internal" href="#windows" id="id10">Windows</a></li>
-<li><a class="reference internal" href="#mac" id="id11">Mac</a></li>
-<li><a class="reference internal" href="#multi-architecture-conventions" id="id12">Multi-architecture conventions</a></li>
+<li><a class="reference internal" href="#how-to-read-the-specification" id="id6">How to read the specification</a></li>
+<li><a class="reference internal" href="#encoding" id="id7">Encoding</a></li>
+<li><a class="reference internal" href="#plugins-location" id="id8">Plugins location</a><ul>
+<li><a class="reference internal" href="#common" id="id9">Common</a></li>
+<li><a class="reference internal" href="#linux" id="id10">Linux</a></li>
+<li><a class="reference internal" href="#windows" id="id11">Windows</a></li>
+<li><a class="reference internal" href="#mac" id="id12">Mac</a></li>
+<li><a class="reference internal" href="#multi-architecture-conventions" id="id13">Multi-architecture conventions</a></li>
</ul>
</li>
-<li><a class="reference internal" href="#instantiate-a-plugin" id="id13">Instantiate a plugin</a><ul>
-<li><a class="reference internal" href="#precautions" id="id14">Precautions</a></li>
-<li><a class="reference internal" href="#plugins-collection" id="id15">Plugins collection</a><ul>
-<li><a class="reference internal" href="#sample-plugin-loader" id="id16">Sample plugin loader</a></li>
+<li><a class="reference internal" href="#instantiate-a-plugin" id="id14">Instantiate a plugin</a><ul>
+<li><a class="reference internal" href="#precautions" id="id15">Precautions</a></li>
+<li><a class="reference internal" href="#plugins-collection" id="id16">Plugins collection</a><ul>
+<li><a class="reference internal" href="#sample-plugin-loader" id="id17">Sample plugin loader</a></li>
</ul>
</li>
-<li><a class="reference internal" href="#description" id="id17">Description</a></li>
-<li><a class="reference internal" href="#audio-ports-configuration" id="id18">Audio ports configuration</a><ul>
-<li><a class="reference internal" href="#pin-layout" id="id19">Pin layout</a></li>
-<li><a class="reference internal" href="#available-configurations" id="id20">Available configurations</a></li>
-<li><a class="reference internal" href="#selecting-a-configuration" id="id21">Selecting a configuration</a></li>
-<li><a class="reference internal" href="#repeatable-channels" id="id22">Repeatable channels</a></li>
-<li><a class="reference internal" href="#feedback-stream" id="id23">Feedback stream</a></li>
+<li><a class="reference internal" href="#description" id="id18">Description</a></li>
+<li><a class="reference internal" href="#audio-ports-configuration" id="id19">Audio ports configuration</a><ul>
+<li><a class="reference internal" href="#pin-layout" id="id20">Pin layout</a></li>
+<li><a class="reference internal" href="#available-configurations" id="id21">Available configurations</a></li>
+<li><a class="reference internal" href="#selecting-a-configuration" id="id22">Selecting a configuration</a></li>
+<li><a class="reference internal" href="#repeatable-channels" id="id23">Repeatable channels</a></li>
+<li><a class="reference internal" href="#feedback-stream" id="id24">Feedback stream</a></li>
</ul>
</li>
</ul>
</li>
-<li><a class="reference internal" href="#threading" id="id24">Threading</a></li>
-<li><a class="reference internal" href="#activation" id="id25">Activation</a></li>
-<li><a class="reference internal" href="#processing" id="id26">Processing</a><ul>
-<li><a class="reference internal" href="#audio-buffers" id="id27">Audio buffers</a></li>
-<li><a class="reference internal" href="#events" id="id28">Events</a><ul>
-<li><a class="reference internal" href="#notes" id="id29">Notes</a></li>
-<li><a class="reference internal" href="#parameters" id="id30">Parameters</a></li>
-<li><a class="reference internal" href="#pitch" id="id31">Pitch</a></li>
+<li><a class="reference internal" href="#threading" id="id25">Threading</a></li>
+<li><a class="reference internal" href="#activation" id="id26">Activation</a></li>
+<li><a class="reference internal" href="#processing" id="id27">Processing</a><ul>
+<li><a class="reference internal" href="#audio-buffers" id="id28">Audio buffers</a></li>
+<li><a class="reference internal" href="#events" id="id29">Events</a><ul>
+<li><a class="reference internal" href="#notes" id="id30">Notes</a></li>
+<li><a class="reference internal" href="#parameters" id="id31">Parameters</a></li>
+<li><a class="reference internal" href="#pitch" id="id32">Pitch</a></li>
</ul>
</li>
</ul>
</li>
-<li><a class="reference internal" href="#id1" id="id32">Parameters</a><ul>
-<li><a class="reference internal" href="#types" id="id33">Types</a></li>
-<li><a class="reference internal" href="#scales" id="id34">Scales</a></li>
-<li><a class="reference internal" href="#automation" id="id35">Automation</a></li>
+<li><a class="reference internal" href="#id1" id="id33">Parameters</a><ul>
+<li><a class="reference internal" href="#types" id="id34">Types</a></li>
+<li><a class="reference internal" href="#scales" id="id35">Scales</a></li>
+<li><a class="reference internal" href="#automation" id="id36">Automation</a></li>
</ul>
</li>
-<li><a class="reference internal" href="#graphical-user-interface" id="id36">Graphical User Interface</a><ul>
-<li><a class="reference internal" href="#showing-the-gui" id="id37">Showing the GUI</a></li>
-<li><a class="reference internal" href="#sending-events-to-the-host" id="id38">Sending events to the host</a></li>
-<li><a class="reference internal" href="#hiding-the-gui" id="id39">Hiding the GUI</a></li>
-<li><a class="reference internal" href="#embedding" id="id40">Embedding</a><ul>
-<li><a class="reference internal" href="#sample-on-windows" id="id41">Sample on Windows</a></li>
+<li><a class="reference internal" href="#graphical-user-interface" id="id37">Graphical User Interface</a><ul>
+<li><a class="reference internal" href="#showing-the-gui" id="id38">Showing the GUI</a></li>
+<li><a class="reference internal" href="#sending-events-to-the-host" id="id39">Sending events to the host</a></li>
+<li><a class="reference internal" href="#hiding-the-gui" id="id40">Hiding the GUI</a></li>
+<li><a class="reference internal" href="#embedding" id="id41">Embedding</a><ul>
+<li><a class="reference internal" href="#sample-on-windows" id="id42">Sample on Windows</a></li>
</ul>
</li>
</ul>
</li>
-<li><a class="reference internal" href="#presets" id="id42">Presets</a><ul>
-<li><a class="reference internal" href="#list-plugin-s-presets" id="id43">List plugin's presets</a></li>
-<li><a class="reference internal" href="#load-a-preset" id="id44">Load a preset</a></li>
+<li><a class="reference internal" href="#presets" id="id43">Presets</a><ul>
+<li><a class="reference internal" href="#list-plugin-s-presets" id="id44">List plugin's presets</a></li>
+<li><a class="reference internal" href="#load-a-preset" id="id45">Load a preset</a></li>
</ul>
</li>
-<li><a class="reference internal" href="#save-and-restore-plugin-s-state" id="id45">Save and restore plugin's state</a></li>
-<li><a class="reference internal" href="#extension-system" id="id46">Extension system</a></li>
+<li><a class="reference internal" href="#save-and-restore-plugin-s-state" id="id46">Save and restore plugin's state</a></li>
+<li><a class="reference internal" href="#extension-system" id="id47">Extension system</a></li>
</ul>
</li>
-<li><a class="reference internal" href="#examples" id="id47">Examples</a><ul>
-<li><a class="reference internal" href="#samples-clap-info-c" id="id48">samples/clap-info.c</a></li>
+<li><a class="reference internal" href="#examples" id="id48">Examples</a><ul>
+<li><a class="reference internal" href="#samples-clap-info-c" id="id49">samples/clap-info.c</a></li>
</ul>
</li>
-<li><a class="reference internal" href="#references" id="id49">References</a><ul>
-<li><a class="reference internal" href="#clap-h" id="id50">clap.h</a></li>
-<li><a class="reference internal" href="#clap-embed-h" id="id51">clap-embed.h</a></li>
-<li><a class="reference internal" href="#clap-embed-win32-h" id="id52">clap-embed-win32.h</a></li>
-<li><a class="reference internal" href="#clap-embed-xlib-h" id="id53">clap-embed-xlib.h</a></li>
+<li><a class="reference internal" href="#references" id="id50">References</a><ul>
+<li><a class="reference internal" href="#clap-h" id="id51">clap.h</a></li>
+<li><a class="reference internal" href="#clap-embed-h" id="id52">clap-embed.h</a></li>
+<li><a class="reference internal" href="#clap-embed-win32-h" id="id53">clap-embed-win32.h</a></li>
+<li><a class="reference internal" href="#clap-embed-xlib-h" id="id54">clap-embed-xlib.h</a></li>
</ul>
</li>
</ul>
@@ -233,36 +234,41 @@ add new parameters, new outputs/inputs, etc... dynamically.</li>
</div>
<div class="section" id="specification">
<h1><a class="toc-backref" href="#id5">Specification</a></h1>
+<div class="section" id="how-to-read-the-specification">
+<h2><a class="toc-backref" href="#id6">How to read the specification</a></h2>
+<p>The specification should be read along the reference headers.
+<a class="reference external" href="https://abique.github.io/clap/">https://abique.github.io/clap/</a> gives a convinient view for that.</p>
+</div>
<div class="section" id="encoding">
-<h2><a class="toc-backref" href="#id6">Encoding</a></h2>
+<h2><a class="toc-backref" href="#id7">Encoding</a></h2>
<p>All the strings exchanged through the CLAP interface must be encoded in UTF-8
and must be valid.</p>
</div>
<div class="section" id="plugins-location">
-<h2><a class="toc-backref" href="#id7">Plugins location</a></h2>
+<h2><a class="toc-backref" href="#id8">Plugins location</a></h2>
<div class="section" id="common">
-<h3><a class="toc-backref" href="#id8">Common</a></h3>
+<h3><a class="toc-backref" href="#id9">Common</a></h3>
<ul class="simple">
<li>Directories should be scanned recursively.</li>
</ul>
</div>
<div class="section" id="linux">
-<h3><a class="toc-backref" href="#id9">Linux</a></h3>
+<h3><a class="toc-backref" href="#id10">Linux</a></h3>
<ul class="simple">
<li>Plugins distributed with packages should be installed to: <tt class="docutils literal">/usr/lib/clap/</tt></li>
<li>Plugins installed in the user's home should be installed to: <tt class="docutils literal"><span class="pre">${HOME}/.clap/</span></tt></li>
</ul>
</div>
<div class="section" id="windows">
-<h3><a class="toc-backref" href="#id10">Windows</a></h3>
+<h3><a class="toc-backref" href="#id11">Windows</a></h3>
<p>TBD</p>
</div>
<div class="section" id="mac">
-<h3><a class="toc-backref" href="#id11">Mac</a></h3>
+<h3><a class="toc-backref" href="#id12">Mac</a></h3>
<p>TBD</p>
</div>
<div class="section" id="multi-architecture-conventions">
-<h3><a class="toc-backref" href="#id12">Multi-architecture conventions</a></h3>
+<h3><a class="toc-backref" href="#id13">Multi-architecture conventions</a></h3>
<p>Let's say that we have a plugin called <tt class="docutils literal">DigitalDragon</tt>. If we distribute
it for multiple architecture, then the host should be able to identify which
version is suited for the current architecture by reading its name.</p>
@@ -309,7 +315,7 @@ built for the native/current architecture.</p>
</div>
</div>
<div class="section" id="instantiate-a-plugin">
-<h2><a class="toc-backref" href="#id13">Instantiate a plugin</a></h2>
+<h2><a class="toc-backref" href="#id14">Instantiate a plugin</a></h2>
<p>Plugin instantiating can be done in a few steps:</p>
<ul class="simple">
<li>load the plugin library</li>
@@ -317,7 +323,7 @@ built for the native/current architecture.</p>
<li>instantiate the plugin by calling <tt class="docutils literal">clap_create</tt></li>
</ul>
<div class="section" id="precautions">
-<h3><a class="toc-backref" href="#id14">Precautions</a></h3>
+<h3><a class="toc-backref" href="#id15">Precautions</a></h3>
<ul class="simple">
<li>The function <tt class="docutils literal">clap_create</tt> must be thread-safe.</li>
<li>It must not throw exceptions.</li>
@@ -325,19 +331,19 @@ built for the native/current architecture.</p>
</ul>
</div>
<div class="section" id="plugins-collection">
-<h3><a class="toc-backref" href="#id15">Plugins collection</a></h3>
+<h3><a class="toc-backref" href="#id16">Plugins collection</a></h3>
<p>A single dynamic library can contains multiple clap plugins.
To list them, you have to call <tt class="docutils literal">clap_create</tt> with an index of 0 and increment
the index until you reach <tt class="docutils literal">plugin_count</tt>.
<tt class="docutils literal">clap_create</tt> returns <tt class="docutils literal">NULL</tt> if the plugin creation failed or if
<tt class="docutils literal">plugin_index >= plugin_count</tt>.</p>
<div class="section" id="sample-plugin-loader">
-<h4><a class="toc-backref" href="#id16">Sample plugin loader</a></h4>
+<h4><a class="toc-backref" href="#id17">Sample plugin loader</a></h4>
<p>See <a class="reference internal" href="#samples-clap-info-c">samples/clap-info.c</a></p>
</div>
</div>
<div class="section" id="description">
-<h3><a class="toc-backref" href="#id17">Description</a></h3>
+<h3><a class="toc-backref" href="#id18">Description</a></h3>
<p>Both the <tt class="docutils literal">struct clap_plugin;</tt> and <tt class="docutils literal">struct clap_host;</tt> have a few attribute giving
general plugin/host information.</p>
<table border="1" class="docutils">
@@ -418,13 +424,13 @@ For example: <tt class="docutils literal">fm;analogue;delay</tt>.</td>
</table>
</div>
<div class="section" id="audio-ports-configuration">
-<h3><a class="toc-backref" href="#id18">Audio ports configuration</a></h3>
+<h3><a class="toc-backref" href="#id19">Audio ports configuration</a></h3>
<p>A plugin may have multiple audio ports, and so multiple audio ports
layout or configurations.</p>
<p>An audio port has a type: mono, stereo, surround and a role: main
input/output, sidechain, feedback.</p>
<div class="section" id="pin-layout">
-<h4><a class="toc-backref" href="#id19">Pin layout</a></h4>
+<h4><a class="toc-backref" href="#id20">Pin layout</a></h4>
<table border="1" class="docutils">
<colgroup>
<col width="28%" />
@@ -543,7 +549,7 @@ input/output, sidechain, feedback.</p>
</table>
</div>
<div class="section" id="available-configurations">
-<h4><a class="toc-backref" href="#id20">Available configurations</a></h4>
+<h4><a class="toc-backref" href="#id21">Available configurations</a></h4>
<p>It is possible to discover a plugin's port configurations by calling
<tt class="docutils literal"><span class="pre">plugin->get_ports_configs_count(plugin);</span></tt>. It returns the number of
configurations. Then for each configuration you have to call
@@ -553,13 +559,13 @@ you have to call
<tt class="docutils literal"><span class="pre">plugin->get_port_info(plugin,</span> config_index, port_index, &port);</tt>.</p>
</div>
<div class="section" id="selecting-a-configuration">
-<h4><a class="toc-backref" href="#id21">Selecting a configuration</a></h4>
+<h4><a class="toc-backref" href="#id22">Selecting a configuration</a></h4>
<p>Selecting an audio configuration has to be done when the plugin is deactivated.
It is done by calling <tt class="docutils literal"><span class="pre">plugin->set_port_config(plugin,</span> config_index)</tt>.
If the call returns false, then the plugin is in failed state.</p>
</div>
<div class="section" id="repeatable-channels">
-<h4><a class="toc-backref" href="#id22">Repeatable channels</a></h4>
+<h4><a class="toc-backref" href="#id23">Repeatable channels</a></h4>
<p>Repeatable channels are a special case. A channel can be identified as
repeatable if <tt class="docutils literal"><span class="pre">channel->is_repeatable</span> == true</tt>.</p>
<p>A useful case is for an analyzer. Imagine a spectroscope, to which you want to
@@ -573,7 +579,7 @@ If it returns <tt class="docutils literal">false</tt> then the plugin is in the
the call.</p>
</div>
<div class="section" id="feedback-stream">
-<h4><a class="toc-backref" href="#id23">Feedback stream</a></h4>
+<h4><a class="toc-backref" href="#id24">Feedback stream</a></h4>
<p>Feedback stream are used to plug external audio processing into one
of the plugin feedback loop.</p>
<p>A practical usage is to put an effect in a delay feedback loop.</p>
@@ -614,11 +620,11 @@ is used to process the feedback stream:</p>
</div>
</div>
<div class="section" id="threading">
-<h2><a class="toc-backref" href="#id24">Threading</a></h2>
+<h2><a class="toc-backref" href="#id25">Threading</a></h2>
<p>The plugin must be thread safe.</p>
</div>
<div class="section" id="activation">
-<h2><a class="toc-backref" href="#id25">Activation</a></h2>
+<h2><a class="toc-backref" href="#id26">Activation</a></h2>
<p>Before doing any processing, the plugin must be activated by calling
<tt class="docutils literal">bool succeed = <span class="pre">plugin->activate(plugin);</span></tt>.</p>
<p>If <tt class="docutils literal">succeed == true</tt> then the activation succeed. If the activation failed,
@@ -637,7 +643,7 @@ not activated.</p>
<p>It is preferable to de-activate the plugin before destroying it.</p>
</div>
<div class="section" id="processing">
-<h2><a class="toc-backref" href="#id26">Processing</a></h2>
+<h2><a class="toc-backref" href="#id27">Processing</a></h2>
<p>The processing is done in one call: <tt class="docutils literal"><span class="pre">plugin->process(plugin,</span> process);</tt>.
The data structure process regroup everything needed by the plugin:</p>
<ul class="simple">
@@ -648,7 +654,7 @@ The data structure process regroup everything needed by the plugin:</p>
<li>more processing needed (out)</li>
</ul>
<div class="section" id="audio-buffers">
-<h3><a class="toc-backref" href="#id27">Audio buffers</a></h3>
+<h3><a class="toc-backref" href="#id28">Audio buffers</a></h3>
<ul class="simple">
<li>The audio buffers are allocated by the host. They must be aligned by the
maximum requirement of the vector instructions currently available.</li>
@@ -658,14 +664,14 @@ maximum requirement of the vector instructions currently available.</li>
</ul>
</div>
<div class="section" id="events">
-<h3><a class="toc-backref" href="#id28">Events</a></h3>
+<h3><a class="toc-backref" href="#id29">Events</a></h3>
<ul class="simple">
<li>Event's time must be within the process duration:
<tt class="docutils literal"><span class="pre">[process->steady_time</span> .. <span class="pre">process->steady_time</span> + <span class="pre">process->nb_sambles]</span></tt>.</li>
<li>The plugin must not modify the input events (<tt class="docutils literal">in_events</tt>).</li>
</ul>
<div class="section" id="notes">
-<h4><a class="toc-backref" href="#id29">Notes</a></h4>
+<h4><a class="toc-backref" href="#id30">Notes</a></h4>
<p>Notes are represented as a pair <tt class="docutils literal">note, division</tt>.
Division is the number of intervals between one note and an other note with
half or the double frequency. A division by 12 must be supported.</p>
@@ -675,7 +681,7 @@ micro-tuned notes.</p>
<tt class="docutils literal"><span class="pre">plugin->supports_microtones</span> == false</tt>.</p>
</div>
<div class="section" id="parameters">
-<h4><a class="toc-backref" href="#id30">Parameters</a></h4>
+<h4><a class="toc-backref" href="#id31">Parameters</a></h4>
<p>Parameters can be automated by the host using <tt class="docutils literal">CLAP_EVENT_PARAM_SET</tt> or
<tt class="docutils literal">CLAP_EVENT_PARAM_RAMP</tt>.</p>
<p>When using <tt class="docutils literal">CLAP_EVENT_PARAM_RAMP</tt>, the value of the parameter has to be
@@ -683,14 +689,14 @@ incremented by <tt class="docutils literal"><span class="pre">event->param.in
occur on this parameter.</p>
</div>
<div class="section" id="pitch">
-<h4><a class="toc-backref" href="#id31">Pitch</a></h4>
+<h4><a class="toc-backref" href="#id32">Pitch</a></h4>
<p>The pitch is the frequency of the note A4. Its default value is 440Hz.
The pitch can be changed by the host using the <tt class="docutils literal">CLAP_EVENT_PITCH_SET</tt> event.</p>
</div>
</div>
</div>
<div class="section" id="id1">
-<h2><a class="toc-backref" href="#id32">Parameters</a></h2>
+<h2><a class="toc-backref" href="#id33">Parameters</a></h2>
<p>The host can get the plugin's parameters tree by calling:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">plugin->get_params_count(plugin);</span></tt> to know the number of parameters</li>
@@ -745,7 +751,7 @@ types.</td>
</tbody>
</table>
<div class="section" id="types">
-<h3><a class="toc-backref" href="#id33">Types</a></h3>
+<h3><a class="toc-backref" href="#id34">Types</a></h3>
<p>There are a few parameter types:</p>
<table border="1" class="docutils">
<colgroup>
@@ -787,14 +793,14 @@ should rely on <tt class="docutils literal">display_text</tt> to show its value.
</table>
</div>
<div class="section" id="scales">
-<h3><a class="toc-backref" href="#id34">Scales</a></h3>
+<h3><a class="toc-backref" href="#id35">Scales</a></h3>
<p>The plugin can inform the host, which scale to use for the parameter's UI
(knob, slider, ...). <tt class="docutils literal"><span class="pre">clap_param->scale</span></tt> can be set to <tt class="docutils literal">CLAP_PARAM_LINEAR</tt>
or <tt class="docutils literal">CLAP_PARAM_LOG</tt>. A logarithmic scale is convinient for a frequency
parameter.</p>
</div>
<div class="section" id="automation">
-<h3><a class="toc-backref" href="#id35">Automation</a></h3>
+<h3><a class="toc-backref" href="#id36">Automation</a></h3>
<p>When a parameter is modified by the GUI, the plugin should send a
<tt class="docutils literal">CLAP_EVENT_PARAM_SET</tt> event must be sent to the host, using
<tt class="docutils literal"><span class="pre">host->events(host,</span> plugin, events);</tt> so the host can record the automation.</p>
@@ -805,15 +811,15 @@ To do that the plugin uses <tt class="docutils literal"><span class="pre">clap_e
</div>
</div>
<div class="section" id="graphical-user-interface">
-<h2><a class="toc-backref" href="#id36">Graphical User Interface</a></h2>
+<h2><a class="toc-backref" href="#id37">Graphical User Interface</a></h2>
<div class="section" id="showing-the-gui">
-<h3><a class="toc-backref" href="#id37">Showing the GUI</a></h3>
+<h3><a class="toc-backref" href="#id38">Showing the GUI</a></h3>
<p>The plugin should show the GUI after a call to <tt class="docutils literal"><span class="pre">plugin->show_gui(plugin)</span></tt>.
If the plugin could successfully show the GUI, it returns <tt class="docutils literal">true</tt>, <tt class="docutils literal">false</tt>
otherwise.</p>
</div>
<div class="section" id="sending-events-to-the-host">
-<h3><a class="toc-backref" href="#id38">Sending events to the host</a></h3>
+<h3><a class="toc-backref" href="#id39">Sending events to the host</a></h3>
<p>The plugin can notify the host of parameter changes by sending events to:
<tt class="docutils literal"><span class="pre">host->events(host,</span> plugin, events);</tt>.</p>
<p>Events sent to the host should be stamped:</p>
@@ -825,7 +831,7 @@ otherwise.</p>
</pre>
</div>
<div class="section" id="hiding-the-gui">
-<h3><a class="toc-backref" href="#id39">Hiding the GUI</a></h3>
+<h3><a class="toc-backref" href="#id40">Hiding the GUI</a></h3>
<p>The plugin should hide the GUI after a call to <tt class="docutils literal"><span class="pre">plugin->hide_gui(plugin)</span></tt>.
If the plugin window has been closed by the user, then the plugin should
send an event <tt class="docutils literal">CLAP_EVENT_GUI_CLOSED</tt> to the host.</p>
@@ -838,7 +844,7 @@ send an event <tt class="docutils literal">CLAP_EVENT_GUI_CLOSED</tt> to the hos
</pre>
</div>
<div class="section" id="embedding">
-<h3><a class="toc-backref" href="#id40">Embedding</a></h3>
+<h3><a class="toc-backref" href="#id41">Embedding</a></h3>
<p>Some host are designed to embed plugin's window.
As embedding is not a Clap requirement, it is offered as an extension.
Also the OS dependency brought by this feature makes it ideal as an extension.</p>
@@ -875,7 +881,7 @@ Also the OS dependency brought by this feature makes it ideal as an extension.</
</tbody>
</table>
<div class="section" id="sample-on-windows">
-<h4><a class="toc-backref" href="#id41">Sample on Windows</a></h4>
+<h4><a class="toc-backref" href="#id42">Sample on Windows</a></h4>
<pre class="code c literal-block">
<span class="cp">#include <clap/clap.h>
#include <clap/clap-embed-win32.h>
@@ -891,9 +897,9 @@ Also the OS dependency brought by this feature makes it ideal as an extension.</
</div>
</div>
<div class="section" id="presets">
-<h2><a class="toc-backref" href="#id42">Presets</a></h2>
+<h2><a class="toc-backref" href="#id43">Presets</a></h2>
<div class="section" id="list-plugin-s-presets">
-<h3><a class="toc-backref" href="#id43">List plugin's presets</a></h3>
+<h3><a class="toc-backref" href="#id44">List plugin's presets</a></h3>
<p>The host can browse the plugin's preset by calling:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">plugin->get_presets_count(plugin);</span></tt> to know how many presets it has.</li>
@@ -902,7 +908,7 @@ details.</li>
</ul>
</div>
<div class="section" id="load-a-preset">
-<h3><a class="toc-backref" href="#id44">Load a preset</a></h3>
+<h3><a class="toc-backref" href="#id45">Load a preset</a></h3>
<p>To load a preset, the host have to send an event <tt class="docutils literal">CLAP_EVENT_PRESET_SET</tt> to
the plugin.</p>
<p>When a preset is loaded from the plugin's GUI, the plugin must send a
@@ -910,7 +916,7 @@ the plugin.</p>
</div>
</div>
<div class="section" id="save-and-restore-plugin-s-state">
-<h2><a class="toc-backref" href="#id45">Save and restore plugin's state</a></h2>
+<h2><a class="toc-backref" href="#id46">Save and restore plugin's state</a></h2>
<p>Saving the plugin's state is done by:</p>
<pre class="code c literal-block">
<span class="kt">void</span> <span class="o">*</span><span class="n">buffer</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
@@ -930,7 +936,7 @@ plugin state on a little endian machine and send it through the network to a
big endian machine, it should load again successfully.</p>
</div>
<div class="section" id="extension-system">
-<h2><a class="toc-backref" href="#id46">Extension system</a></h2>
+<h2><a class="toc-backref" href="#id47">Extension system</a></h2>
<p>To extend clap's functionnality, there is a pretty simple mechanism:</p>
<pre class="code c literal-block">
<span class="kt">void</span> <span class="o">*</span><span class="n">plug_ext</span> <span class="o">=</span> <span class="n">plugin</span><span class="o">-></span><span class="n">extension</span><span class="p">(</span><span class="n">plug</span><span class="p">,</span> <span class="s">"company/ext-name"</span><span class="p">);</span>
@@ -940,9 +946,9 @@ big endian machine, it should load again successfully.</p>
</div>
</div>
<div class="section" id="examples">
-<h1><a class="toc-backref" href="#id47">Examples</a></h1>
+<h1><a class="toc-backref" href="#id48">Examples</a></h1>
<div class="section" id="samples-clap-info-c">
-<h2><a class="toc-backref" href="#id48">samples/clap-info.c</a></h2>
+<h2><a class="toc-backref" href="#id49">samples/clap-info.c</a></h2>
<pre class="code c literal-block">
<span class="cp">#include <stdio.h>
#include <dlfcn.h>
@@ -1042,9 +1048,9 @@ big endian machine, it should load again successfully.</p>
</div>
</div>
<div class="section" id="references">
-<h1><a class="toc-backref" href="#id49">References</a></h1>
+<h1><a class="toc-backref" href="#id50">References</a></h1>
<div class="section" id="clap-h">
-<h2><a class="toc-backref" href="#id50">clap.h</a></h2>
+<h2><a class="toc-backref" href="#id51">clap.h</a></h2>
<pre class="code c literal-block">
<span class="cm">/**
* CLAP - CLever Audio Plugin (<--- needs to find a marketing ok name)
@@ -1467,7 +1473,7 @@ big endian machine, it should load again successfully.</p>
</pre>
</div>
<div class="section" id="clap-embed-h">
-<h2><a class="toc-backref" href="#id51">clap-embed.h</a></h2>
+<h2><a class="toc-backref" href="#id52">clap-embed.h</a></h2>
<pre class="code c literal-block">
<span class="cp">#ifndef CLAP_EMBED_H
# define CLAP_EMBED_H
@@ -1486,7 +1492,7 @@ big endian machine, it should load again successfully.</p>
</pre>
</div>
<div class="section" id="clap-embed-win32-h">
-<h2><a class="toc-backref" href="#id52">clap-embed-win32.h</a></h2>
+<h2><a class="toc-backref" href="#id53">clap-embed-win32.h</a></h2>
<pre class="code c literal-block">
<span class="cp">#ifndef CLAP_EMBED_WIN32_H
# define CLAP_EMBED_WIN32_H
@@ -1510,7 +1516,7 @@ big endian machine, it should load again successfully.</p>
</pre>
</div>
<div class="section" id="clap-embed-xlib-h">
-<h2><a class="toc-backref" href="#id53">clap-embed-xlib.h</a></h2>
+<h2><a class="toc-backref" href="#id54">clap-embed-xlib.h</a></h2>
<pre class="code c literal-block">
<span class="cp">#ifndef CLAP_EMBED_XLIB_H
# define CLAP_EMBED_XLIB_H