clap

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

commit f88592535d1bc811ec1e639aa33a4820a35d1daf
parent 2adeb1eaf4ca5ac823472223e50073bbf8d95e53
Author: Alexandre Bique <bique.alexandre@gmail.com>
Date:   Sun, 30 Nov 2014 13:28:36 +0100

Update param extension

Diffstat:
Minclude/clap/clap.h | 2+-
Minclude/clap/ext/params.h | 7+++++--
2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/include/clap/clap.h b/include/clap/clap.h @@ -50,7 +50,7 @@ struct clap_host; enum clap_string_size { - CLAP_ID_SIZE = 32, + CLAP_ID_SIZE = 48, CLAP_NAME_SIZE = 32, CLAP_DESC_SIZE = 256, CLAP_DISPLAY_SIZE = 32, diff --git a/include/clap/ext/params.h b/include/clap/ext/params.h @@ -28,7 +28,7 @@ struct clap_param /* param info */ enum clap_param_type type; - char id[32]; // a string which identify the param + char id[CLAP_ID_SIZE]; // a string which identify the param char name[CLAP_NAME_SIZE]; // the display name char desc[CLAP_DESC_SIZE]; bool is_per_note; @@ -42,8 +42,11 @@ struct clap_param struct clap_plugin_params { - /* Returns a newly allocated parameters tree. The caller has to free it. */ + /* Returns the number of parameters. */ uint32_t (*get_params_count)(struct clap_plugin *plugin); + + /* Copies the parameter's info to param and returns true. + * If index is greater or equal to the number then return false. */ bool (*get_param)(struct clap_plugin *plugin, uint32_t index, struct clap_param *param);