commit f17d95653eea4208c15c74e8793bea530a380771
parent cd540843901142314a50d0e07314c85ae54d2454
Author: Alexandre Bique <bique.alexandre@gmail.com>
Date: Fri, 22 Dec 2023 09:54:42 +0100
Merge pull request #372 from baconpaul/expand-on-init
Expand a bit on the difference between init and create
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);