Skip to content

API question plugin->host requests #332

Answered by defiantnerd
dbadb asked this question in Q&A
Discussion options

You must be logged in to vote

You will need to create an object instance for every hosted plugin. This will also contain a pointer back to the plugin instance.
In the clap-wrapper I've introduced an IHost interface and derived the actual wrapping object from it. The pointer to this interface is being provided as clap_host_t*.

https://github.com/free-audio/clap-wrapper/blob/f14d5b24806f1da080d1534199d2668ebd2f5e43/src/wrapasvst3.h#L87

This way I can always find the way back to the plugin and I also know which instance is being addressed.

You will have no success with pointing clap_host_t to the same object for all plugin instances, it is individual for each plugin.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@dbadb
Comment options

@defiantnerd
Comment options

Answer selected by dbadb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants