Cleanup the vst2 converter
#pragma once
-#include "../../clap.h"
-#include "../../stream.h"
+#include "../clap.h"
+#include "../stream.h"
#ifdef __cplusplus
extern "C" {
#endif
+// This interface provide all the tool to convert a vst2 plugin instance into a clap plugin instance
typedef struct clap_vst2_converter {
uint32_t vst2_plugin_id;
const char *vst2_plugin_name;
const char *clap_plugin_id;
// [main-thread]
- bool (*convert_state)(const struct *clap_vst2_converter *converter, const clap_istream *vst2, const clap_ostream *clap);
+ bool (*convert_state)(const struct *clap_vst2_converter *converter,
+ const clap_istream *vst2,
+ const clap_ostream *clap);
// converts the vst2 param id and normalized value to clap param id and
// plain value.
@@ -34,12 +37,17 @@ typedef struct clap_vst2_converter {
double *clap_plain_value);
} clap_vst2_converter;
+// Factory identifier
static CLAP_CONSTEXPR const char CLAP_VST2_CONVERTER_FACTORY_ID[] = "clap.vst2-converter";
-typedef struct clap_vst2_converter_factory
-{
+// List all the converters available in the current DSO.
+typedef struct clap_vst2_converter_factory {
+ // Get the number of converters
uint32_t (*count)(const struct clap_vst2_converter_factory *factory);
- const clap_vst2_converter *(*get)(const struct clap_vst2_converter_factory *factory, uint32_t index);
+
+ // Get the converter at the given index
+ const clap_vst2_converter *(*get)(const struct clap_vst2_converter_factory *factory,
+ uint32_t index);
} clap_vst2_converter_factory;
#ifdef __cplusplus
