Skip to content

Commit

Permalink
feedback from Timo
Browse files Browse the repository at this point in the history
  • Loading branch information
Bremmers authored May 5, 2024
1 parent 6162dca commit 44aa332
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions include/clap/ext/draft/midici-profiles.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ typedef struct clap_plugin_midici_profiles {
// The "enumerating profiles" paragraph above describes what's supposed to be in the list.
// [main-thread]
uint32_t(CLAP_ABI *count)(const clap_plugin_t *plugin,
uint16_t port_index);
uint32_t port_index);

// Get a clap_profile_t by index.
// [main-thread]
bool(CLAP_ABI *get)(const clap_plugin_t *plugin,
uint16_t port_index,
uint32_t port_index,
uint32_t profile_index,
clap_profile_t *profile);

Expand All @@ -95,27 +95,27 @@ typedef struct clap_plugin_midici_profiles {
// The profile targeted by channel/num_channels should generally be enabled before calling this function.
// In some cases profile detals like available channels are needed before enabling a profile. Plugins should make sure this is handled correctly.
// [main-thread]
bool(CLAP_ABI *get_details)(const clap_plugin_t *plugin,
uint16_t port_index,
const clap_profile_id_t profile_id,
uint8_t channel,
uint16_t num_channels,
uint8_t inquiry_target,
const clap_ostream_t *stream);
bool(CLAP_ABI *get_details)(const clap_plugin_t *plugin,
uint32_t port_index,
const clap_profile_id_t *profile_id,
uint8_t channel,
uint16_t num_channels,
uint8_t inquiry_target,
const clap_ostream_t *stream);

// Send Profile Specific Data to profile at channel/num_channels.
// Returns true if data was accepted
// Multiple Profile Specific Data Messages can be passed in buffer. Each one starts with 0xF0, followed by the actual Profile Specific Data, and ends with 0xF7.
// Example: MPE Channel Response Type Notification would be F0 01 F7
// A profile may specify multiple data messages. It's recommended to send the complete 'state' in a single set_data() call.
// [main-thread]
bool(CLAP_ABI *set_data)(const clap_plugin_t *plugin,
uint16_t port_index,
const clap_profile_id_t profile_id,
uint8_t channel,
uint16_t num_channels,
const uint8_t *buffer,
uint32_t buffer_size);
bool(CLAP_ABI *set_data)(const clap_plugin_t *plugin,
uint32_t port_index,
const clap_profile_id_t *profile_id,
uint8_t channel,
uint16_t num_channels,
const uint8_t *buffer,
uint32_t buffer_size);

// Enables a profile at channel/num_channels.
// Returns true if the profile is enabled at channel/num_channels when the function returns.
Expand All @@ -124,22 +124,22 @@ typedef struct clap_plugin_midici_profiles {
// Note for hosts: after calling this function count()/get() may have changed !!
// Note for plugins: do not call clap_host_midici_profiles.changed.
// [main-thread]
bool(CLAP_ABI *enable)(const clap_plugin_t *plugin,
uint16_t port_index,
const clap_profile_id_t profile_id,
uint8_t channel,
uint16_t num_channels);
bool(CLAP_ABI *enable)(const clap_plugin_t *plugin,
uint32_t port_index,
const clap_profile_id_t *profile_id,
uint8_t channel,
uint16_t num_channels);

// Disables a profile at channel/num_channels.
// Returns true if the profile isn't enabled at channel/num_channels when the function returns.
// Note for hosts: after calling this function count()/get() may have changed !!
// Note for plugins: do not call clap_host_midici_profiles.changed.
// [main-thread]
bool(CLAP_ABI *disable)(const clap_plugin_t *plugin,
uint16_t port_index,
const clap_profile_id_t profile_id,
uint8_t channel,
uint16_t num_channels);
bool(CLAP_ABI *disable)(const clap_plugin_t *plugin,
uint32_t port_index,
const clap_profile_id_t *profile_id,
uint8_t channel,
uint16_t num_channels);
} clap_plugin_midici_profiles_t;

typedef struct clap_host_midici_profiles {
Expand All @@ -150,11 +150,11 @@ typedef struct clap_host_midici_profiles {
// Plugins calls this if host needs to read Profile Specific Data Messages again.
// Host calls get_details(.., port_index, profile, channel, num_channels, CLAP_MIDICI_PROFILES_INQUIRY_TARGET_DATA, ..).
// [main-thread]
void(CLAP_ABI *datachanged)(const clap_host_t *host,
uint16_t port_index,
const clap_profile_id_t profile_id,
uint8_t channel,
uint16_t num_channels);
void(CLAP_ABI *datachanged)(const clap_host_t *host,
uint32_t port_index,
const clap_profile_id_t *profile_id,
uint8_t channel,
uint16_t num_channels);
} clap_host_midici_profiles_t;

#ifdef __cplusplus
Expand Down

0 comments on commit 44aa332

Please sign in to comment.