Skip to content

Commit

Permalink
Specify how to format foreign plugin id
Browse files Browse the repository at this point in the history
  • Loading branch information
abique committed Jan 17, 2024
1 parent 498af28 commit c53c0a7
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions include/clap/plugin-id.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ typedef struct clap_plugin_id {
// eg: "clap", "vst3", "vst2", "au", "lv2", ...
const char *abi;

// The plugin ID, for example "com.u-he.Diva".
// If the ABI rely upon binary plugin ids, then they shall be hex encoded (lower case).
// eg:
// T binary_id;
// const uint8_t * data = (const uint8_t *)&binary_id;
// const size_t buffer_size = 2 * sizeof(binary_id) + 1;
// char *buffer = malloc(buffer_size);
// hex_encode(data, sizeof (binary_id), buffer);
// buffer[buffer_size - 1] = '\0';
// The plugin ID, formatted as follow:
//
// Note: if the binary id is sensible to the CPU endianness, the encoded id will be too.
// As a result, the id should be decoded immediately by the consumer.
// CLAP: use the plugin id
// eg: "com.u-he.diva"
//
// AU: format the string like "manu:type:subt"
// eg: "aumu:SgXT:VmbA"
//
// VST2: print the id as a signed 32-bits integer
// eg: "-4382976"
//
// VST3: print the id as a standard UUID
// eg: "123e4567-e89b-12d3-a456-426614174000"
const char *id;
} clap_plugin_id_t;

0 comments on commit c53c0a7

Please sign in to comment.