api: conditionally define callbacks
This commit is contained in:
parent
f942ed5dbb
commit
1af0fb6261
@ -26,10 +26,14 @@ typedef struct {
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
{{?it.product.state && it.product.state.dspCustom}}
|
||||
int (*write_state)(void *handle, const char *data, size_t length);
|
||||
{{?it.product.parameters.find(x => x.direction == "input")}}
|
||||
void (*load_parameter)(void *handle, size_t index, float value);
|
||||
{{?}}
|
||||
void (*lock_state)(void *handle);
|
||||
void (*unlock_state)(void *handle);
|
||||
{{?}}
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
|
@ -212,16 +212,9 @@ static LV2_Handle instantiate(const struct LV2_Descriptor * descriptor, double s
|
||||
/* .write_state = */ write_state_cb,
|
||||
# if DATA_PRODUCT_CONTROL_INPUTS_N > 0
|
||||
/* .load_parameter = */ load_parameter_cb,
|
||||
# else
|
||||
/* .load_parameter = */ NULL,
|
||||
# endif
|
||||
/* .lock_state = */ lock_state_cb,
|
||||
/* .unlock_state = */ unlock_state_cb
|
||||
# else
|
||||
/* .write_state = */ NULL,
|
||||
/* .load_parameter = */ NULL,
|
||||
/* .state_lock = */ NULL,
|
||||
/* .state_unlock = */ NULL
|
||||
/* .unlock_state = */ unlock_state_cb,
|
||||
# endif
|
||||
};
|
||||
plugin_init(&instance->p, &cbs);
|
||||
|
Loading…
Reference in New Issue
Block a user