commit 40bb780c0a6312aef537e81022e5d863981c2f4e
parent 37bab41b681f8c91644b52baad86af97653eef3e
Author: Alexandre Bique <bique.alexandre@gmail.com>
Date: Fri, 22 Dec 2023 11:13:49 +0100
Add error message to convert_state()
Diffstat:
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/include/clap/factory/draft/plugin-state-converter.h b/include/clap/factory/draft/plugin-state-converter.h
@@ -20,11 +20,17 @@ typedef struct clap_plugin_state_converter {
const clap_plugin_id_t *dst_plugin_id;
// Converts the input state to a state usable by the destination plugin.
+ //
+ // error_buffer is a place holder of error_buffer_size bytes for storing a null-terminated
+ // error message in case of failure, which can be displayed to the user.
+ //
// Returns true on success.
// [thread-safe]
bool (*convert_state)(const struct clap_plugin_state_converter *converter,
const clap_istream_t *src,
- const clap_ostream_t *dst);
+ const clap_ostream_t *dst,
+ char *error_buffer,
+ size_t error_buffer_size);
// Converts a normalized value.
// Returns true on success.