clap

CLAP Audio Plugin API
Log | Files | Refs | README | LICENSE

commit cb28136312600e2a6c23c289670364bf94dd406a
parent 5182bbd5b2ce03db2c99cf571ba9032869c0513e
Author: Alexandre BIQUE <bique.alexandre@gmail.com>
Date:   Wed, 19 May 2021 09:21:26 +0200

Host: check that the plugin has the same CLAP_VERSION until version 1.0, when the ABI is stable

Diffstat:
Mexamples/host/plugin-host.cc | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/examples/host/plugin-host.cc b/examples/host/plugin-host.cc @@ -132,6 +132,13 @@ bool PluginHost::load(const QString &path, int pluginIndex) { return false; } + if (desc->clap_version != CLAP_VERSION) { + qWarning() << "incompatible clap version: " << CLAP_VERSION_MAJ(desc->clap_version) << "." + << CLAP_VERSION_MIN(desc->clap_version) << "." + << CLAP_VERSION_REV(desc->clap_version); + return false; + } + plugin_ = pluginEntry_->create_plugin(&host_, desc->id); if (!plugin_) { qWarning() << "could not create the plugin with id: " << desc->id;