Skip to content

Plugin State Converter rework - #454

Draft
abique wants to merge 3 commits into
free-audio:nextfrom
abique:state-converter
Draft

Plugin State Converter rework#454
abique wants to merge 3 commits into
free-audio:nextfrom
abique:state-converter

Conversation

@abique

@abique abique commented Feb 5, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@abique abique self-assigned this Feb 5, 2025
clap_id src_param_id,
clap_id *dst_param_ids,
uint32_t dst_param_ids_size);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_mapping is reduntant I think? convert_value can do this already.

clap_plugin_state_converter_param_value_t *dsts,
uint32_t dsts_size);
} clap_plugin_state_converter_t;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to turn convert_state, get_mapping and convert_value into a single function:

int32_t(CLAP_ABI *convert)(struct clap_plugin_state_converter *converter,
uint32_t flags,
const clap_istream_t *src,
const clap_ostream_t *dst,
clap_plugin_state_converter_param_value_t *srcs,
uint32_t srcs_count,
clap_plugin_state_converter_param_value_t *dsts,
uint32_t dsts_size);

This avoids the rather ugly "convert_value assumes the state of the plugin to the one from the most recent call to". It also gives plugin developers the whole shebang in one go, so we don't have to change it again when a developer needs to see more than one automation point to be able to do the right thing.

@abique
abique force-pushed the next branch 2 times, most recently from eff5302 to 00113aa Compare February 18, 2025 09:54
@abique
abique marked this pull request as draft March 8, 2025 15:39
@abique
abique force-pushed the next branch 8 times, most recently from fb5acc0 to 89b761c Compare March 11, 2025 07:49
@abique
abique force-pushed the next branch 3 times, most recently from 65f58e0 to 3e2c1a5 Compare November 24, 2025 12:10
@abique
abique force-pushed the next branch 8 times, most recently from 896cdbc to 736f014 Compare May 21, 2026 08:07
@abique
abique force-pushed the next branch 6 times, most recently from 1e83856 to 275a785 Compare May 23, 2026 09:25
@abique
abique force-pushed the next branch 2 times, most recently from e71b4fa to 195b42a Compare July 13, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants