commit 715303414672c4d6b92fbe27aca2627ebe4d1c25
parent 7a449a102d83c9dba796d80000bde929cb1da2bb
Author: Alexandre Bique <bique.alexandre@gmail.com>
Date: Tue, 30 Dec 2014 13:25:51 +0100
Add an attribute for in place processing, and update clap-info
Diffstat:
4 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/include/clap/clap.h b/include/clap/clap.h
@@ -84,6 +84,8 @@ enum clap_log_severity
// Shoudl be "1" if the plugin is doing remote processing.
// This is a hint for the host to optimize task scheduling.
# define CLAP_ATTR_IS_REMOTE_PROCESSING "clap/is_remote_processing"
+// Should be "1" if the plugin supports in place processing.
+# define CLAP_ATTR_SUPPORTS_IN_PLACE_PROCESSING "clap/supports_in_place_processing"
////////////////
// PARAMETERS //
diff --git a/spec.html b/spec.html
@@ -394,12 +394,15 @@ For example: <tt class="docutils literal">fm;analogue;delay</tt>.</td>
<td>The latency introduced by the plugin.</td>
</tr>
<tr><td>CLAP_ATTR_SUPPORTS_TUNING</td>
-<td>True if the plugin supports tuning.</td>
+<td><tt class="docutils literal">1</tt> if the plugin supports tuning.</td>
</tr>
<tr><td>CLAP_ATTR_IS_REMOTE_PROCESSING</td>
-<td>True if the plugin is doing remote processing. This can help
+<td><tt class="docutils literal">1</tt> if the plugin is doing remote processing. This can help
the DAW's task scheduling.</td>
</tr>
+<tr><td>..._IN_PLACE_PROCESSING</td>
+<td><tt class="docutils literal">1</tt> if the plugin supports in place processing.</td>
+</tr>
</tbody>
</table>
</div>
@@ -642,7 +645,8 @@ or <tt class="docutils literal">CLAP_EVENT_PARAM_RAMP</tt> for those parameters
<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>
-<li>In-place processing is not supported.</li>
+<li>In-place processing is not supported by default, yet the host can use it
+if the plugin has the attribute <tt class="docutils literal">CLAP_ATTR_SUPPORTS_IN_PLACE_PROCESSING</tt>.</li>
<li>The number of samples must be a multiple of the plugin chunk_size.</li>
<li>See <a class="reference internal" href="#pin-layout">Pin layout</a>.</li>
<li>See <a class="reference internal" href="#plugin-description">Plugin description</a></li>
@@ -1093,6 +1097,8 @@ big endian machine, it should load again successfully.</p>
<span class="n">print_attr</span><span class="p">(</span><span class="n">CHUNK_SIZE</span><span class="p">);</span>
<span class="n">print_attr</span><span class="p">(</span><span class="n">LATENCY</span><span class="p">);</span>
<span class="n">print_attr</span><span class="p">(</span><span class="n">SUPPORTS_TUNING</span><span class="p">);</span>
+ <span class="n">print_attr</span><span class="p">(</span><span class="n">SUPPORTS_IN_PLACE_PROCESSING</span><span class="p">);</span>
+ <span class="n">print_attr</span><span class="p">(</span><span class="n">IS_REMOTE_PROCESSING</span><span class="p">);</span>
<span class="cp">#undef print_attr
</span>
@@ -1198,6 +1204,8 @@ big endian machine, it should load again successfully.</p>
</span><span class="c1">// Shoudl be "1" if the plugin is doing remote processing.
// This is a hint for the host to optimize task scheduling.
</span><span class="cp"># define CLAP_ATTR_IS_REMOTE_PROCESSING "clap/is_remote_processing"
+</span><span class="c1">// Should be "1" if the plugin supports in place processing.
+</span><span class="cp"># define CLAP_ATTR_SUPPORTS_IN_PLACE_PROCESSING "clap/supports_in_place_processing"
</span>
<span class="c1">////////////////
// PARAMETERS //
diff --git a/spec.rst b/spec.rst
@@ -181,11 +181,13 @@ Then to get plugin's attribute, you have to use ``plugin->get_attribute(plugin,
+--------------------------------+---------------------------------------------------------------+
| CLAP_ATTR_LATENCY | The latency introduced by the plugin. |
+--------------------------------+---------------------------------------------------------------+
-| CLAP_ATTR_SUPPORTS_TUNING | True if the plugin supports tuning. |
+| CLAP_ATTR_SUPPORTS_TUNING | ``1`` if the plugin supports tuning. |
+--------------------------------+---------------------------------------------------------------+
-| CLAP_ATTR_IS_REMOTE_PROCESSING | True if the plugin is doing remote processing. This can help |
+| CLAP_ATTR_IS_REMOTE_PROCESSING | ``1`` if the plugin is doing remote processing. This can help |
| | the DAW's task scheduling. |
+--------------------------------+---------------------------------------------------------------+
+| ..._IN_PLACE_PROCESSING | ``1`` if the plugin supports in place processing. |
++--------------------------------+---------------------------------------------------------------+
Extension system
~~~~~~~~~~~~~~~~
@@ -386,7 +388,8 @@ Audio buffers
- The audio buffers are allocated by the host. They must be aligned by the
maximum requirement of the vector instructions currently available.
-- In-place processing is not supported.
+- In-place processing is not supported by default, yet the host can use it
+ if the plugin has the attribute ``CLAP_ATTR_SUPPORTS_IN_PLACE_PROCESSING``.
- The number of samples must be a multiple of the plugin chunk_size.
- See `Pin layout`_.
- See `Plugin description`_
diff --git a/tools/clap-info/clap-info.c b/tools/clap-info/clap-info.c
@@ -81,6 +81,8 @@ int main(int argc, char **argv)
print_attr(CHUNK_SIZE);
print_attr(LATENCY);
print_attr(SUPPORTS_TUNING);
+ print_attr(SUPPORTS_IN_PLACE_PROCESSING);
+ print_attr(IS_REMOTE_PROCESSING);
#undef print_attr