Skip to content

Commit

Permalink
Make plug initialisation step compliant with the spec (#36)
Browse files Browse the repository at this point in the history
According to the official header [plugin.h](https://github.com/free-audio/clap/blob/main/include/clap/plugin.h)

```
// 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.
```
  • Loading branch information
odiroot authored Jan 10, 2024
1 parent 271a6f3 commit 79fc46c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/clap-info/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,12 @@ int main(int argc, char **argv)
return 5;
}

inst->init(inst);
bool result = inst->init(inst);
if (!result) {
std::cerr << "Unable to init plugin" << std::endl;
doc.active = false;
return 6;
}
inst->activate(inst, 48000, 32, 4096);

Json::Value extensions;
Expand Down

0 comments on commit 79fc46c

Please sign in to comment.