commit 56fa0195aaf47b8b81275e3e3996ecf80660c402
parent f52dd8639624a723d6db45af70c73cf68b16ef5f
Author: Paul Walker <paul@pwjw.com>
Date: Thu, 21 Dec 2023 10:07:54 -0500
Expand a bit on the difference between init and create
This documentation was by create, but it wasn't by init, so make it
clear in both locations.
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/include/clap/plugin.h b/include/clap/plugin.h
@@ -46,6 +46,9 @@ typedef struct clap_plugin {
// Must be called after creating the plugin.
// If init returns false, the host must destroy the plugin instance.
// If init returns true, then the plugin is initialized and in the deactivated state.
+ // Unlike in `plugin-factory::create_plugin`, in init you have complete access to the host
+ // and host extensions, so clap related setup activities should be done here rather than in
+ // create_plugin.
// [main-thread]
bool(CLAP_ABI *init)(const struct clap_plugin *plugin);