clap

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

commit 224ef0fa5243f7a8eff60bbd6b40b10a3b49f026
parent 99db5cc2748f766e6eb13c3a8b183c6e35c0b97f
Author: Alexandre BIQUE <bique.alexandre@gmail.com>
Date:   Sun, 25 Apr 2021 02:14:38 +0200

That was not cool

Diffstat:
Minclude/clap/clap.h | 10++++++----
Minclude/clap/ext/audio-ports.h | 10++++++----
2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/include/clap/clap.h b/include/clap/clap.h @@ -165,11 +165,11 @@ struct clap_event { struct clap_event_list { void *ctx; - int32_t (*size)(const struct clap_event_list *list); + uint32_t (*size)(const struct clap_event_list *list); // Don't free the return event, it belongs to the list const struct clap_event *(*get)(const struct clap_event_list *list, - int index); + uint32_t index); // Makes a copy of the event void (*push_back)(const struct clap_event_list *list, @@ -231,8 +231,10 @@ struct clap_process { // Audio buffers, they must have the same count as specified // by clap_plugin_audio_ports->get_count(). // The index maps to clap_plugin_audio_ports->get_info(). - const struct clap_audio_buffer *audio_buffers; - int audio_buffers_count; + const struct clap_audio_buffer *audio_inputs; + const struct clap_audio_buffer *audio_outputs; + int32_t audio_inputs_count; + int32_t audio_outputs_count; /* events */ const struct clap_event_list *in_events; diff --git a/include/clap/ext/audio-ports.h b/include/clap/ext/audio-ports.h @@ -22,7 +22,6 @@ enum clap_audio_port_channel_mapping { struct clap_audio_port_info { char name[CLAP_NAME_SIZE]; // displayable name - bool is_input; bool is_main; // there can only be 1 main input and output bool is_cv; // control voltage bool supports_64_bits; // 32 bit support is mandatory, the host chooses @@ -35,19 +34,22 @@ struct clap_audio_port_info { // The audio ports scan has to be done while the plugin is deactivated. struct clap_plugin_audio_ports { - // number of ports, both inputs and outputs + // number of ports, for either input or output // [main-thread] - int32_t (*get_count)(struct clap_plugin *plugin); + int32_t (*get_count)(struct clap_plugin *plugin, bool is_input); // get info about about an audio port. // [main-thread] void (*get_info)(struct clap_plugin * plugin, int32_t index, + bool is_input, struct clap_audio_port_info *info); // Returns the port latency. // [main-thread] - int32_t (*get_latency)(struct clap_plugin *plugin, int32_t index); + int32_t (*get_latency)(struct clap_plugin *plugin, + int32_t index, + bool is_input); }; struct clap_host_audio_ports {