clap

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

commit b5c61830aeb9348db45b9b626d77e3fc4ea26bc0
parent 40eca606e47c1a0d0a72c027c32b6ffb149d9267
Author: Alexandre Bique <bique.alexandre@gmail.com>
Date:   Fri, 27 May 2022 11:59:27 +0200

Rework the standard string sizes

Diffstat:
Minclude/clap/ext/draft/track-info.h | 2+-
Minclude/clap/ext/params.h | 8++++----
Minclude/clap/string-sizes.h | 8++++++--
3 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/include/clap/ext/draft/track-info.h b/include/clap/ext/draft/track-info.h @@ -14,7 +14,7 @@ typedef struct clap_track_info { clap_id id; int32_t index; char name[CLAP_NAME_SIZE]; - char path[CLAP_MODULE_SIZE]; // Like "/group1/group2/drum-machine/drum-pad-13" + char path[CLAP_PATH_SIZE]; // Like "/group1/group2/drum-machine/drum-pad-13" int32_t channel_count; const char *audio_port_type; clap_color_t color; diff --git a/include/clap/ext/params.h b/include/clap/ext/params.h @@ -167,10 +167,10 @@ typedef struct clap_param_info { // destroyed. void *cookie; - char name[CLAP_NAME_SIZE]; // the display name - char module[CLAP_MODULE_SIZE]; // the module containing the param, eg: - // "oscillators/wt1"; '/' will be used as a - // separator to show a tree like structure. + char name[CLAP_NAME_SIZE]; // the display name + char module[CLAP_PATH_SIZE]; // the module containing the param, eg: + // "oscillators/wt1"; '/' will be used as a + // separator to show a tree like structure. double min_value; // minimum plain value double max_value; // maximum plain value diff --git a/include/clap/string-sizes.h b/include/clap/string-sizes.h @@ -5,9 +5,13 @@ extern "C" { #endif enum { + // String capacity for names that can be displayed to the user. + // 256 characters is very large, and it would be impractical to display such a long name. CLAP_NAME_SIZE = 256, - CLAP_MODULE_SIZE = 512, - CLAP_PATH_SIZE = 4096, + + // String capacity for describing a path, like a parameter in a module hierarchy or path within a + // set of nested track groups. + CLAP_PATH_SIZE = 1024, }; #ifdef __cplusplus