commit 1f261e4e9357c3ab348a6e5ecc4c16282a41b0f3
parent 742b27a2c930239260491d353ee7206226a3fa80
Author: Alexandre Bique <bique.alexandre@gmail.com>
Date: Sun, 30 Nov 2014 14:42:26 +0100
Improve the documentation
Diffstat:
3 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/include/clap/ext/embed-xlib.h b/include/clap/ext/embed-xlib.h
@@ -12,7 +12,10 @@ struct clap_plugin_embed_xlib
{
void (*get_size)(uint32_t *width, uint32_t *height);
- /* the display_name can be retrieved from your own
+ /* Note for the client, you can get a Display* by calling
+ * XOpenDisplay(display_name).
+ *
+ * Note for the host, the display_name can be retrieved from your own
* display->display_name. */
bool (*embed)(struct clap_plugin *plugin,
Window window,
diff --git a/include/clap/ext/ports.h b/include/clap/ext/ports.h
@@ -33,10 +33,11 @@ struct clap_ports_config
uint32_t outputs_count;
};
+/* The audio ports configuration has to be done while the plugin is
+ * deactivated. */
struct clap_plugin_ports
{
- /* Audio ports.
- * The port configuration has to be done while the plugin is deactivated. */
+ /* Returns the number of available configurations */
uint32_t (*get_ports_configs_count)(struct clap_plugin *plugin);
bool (*get_ports_config)(struct clap_plugin *plugin,
uint32_t config_index,
diff --git a/include/clap/ext/render.h b/include/clap/ext/render.h
@@ -7,18 +7,31 @@
enum clap_plugin_render_mode
{
+ /* Default setting, used to play "realtime". */
CLAP_RENDER_REALTIME = 0,
+ /* Render setting, used while rendering the song. */
CLAP_RENDER_OFFLINE = 1,
};
+/* The render extension is used to have different quality settings while
+ * playing realtime and while rendering. This feature is useful if your
+ * processor is not fast enough to render at maximum quality in realtime.
+ *
+ * It should be used with care because, if you do all your equalization
+ * with realtime settings and you render with offline settings, then
+ * you might not get the sound you expected.
+ */
struct clap_plugin_render
{
- /* Sets the plugin render mode.
+ /* Sets the plugin render mode, while the plugin is deactivated.
* Returns true on success, false otherwise.
* On failure the render mode is unchanged.
*/
bool (*set_render_mode)(struct clap_plugin *plugin,
enum clap_plugin_render_mode mode);
+
+ /* Gets the current rendering mode, can be set anytime. */
+ enum clap_plugin_render_mode (*get_render_mode)(struct clap_plugin *plugin);
};
#endif /* !CLAP_EXT_RENDER_H */