SwitchTrigger4 save/restore channel as LV2_State#12
Conversation
| /**********************************************************************************************************************************************************/ | ||
|
|
||
| #define PLUGIN_URI "http://moddevices.com/plugins/mod-devel/SwitchTrigger4" | ||
| #define CHANNEL_URI "http://moddevices.com/plugins/mod-devel/SwitchTrigger4#channel>" |
There was a problem hiding this comment.
there is an extra > at the end, please remove it
| @@ -1,16 +1,26 @@ | |||
| #include <stdlib.h> | |||
| #include <stdlib.h> | |||
|
|
||
| /**********************************************************************************************************************************************************/ | ||
|
|
||
| static LV2_State_Status channel_save(LV2_Handle handle, LV2_State_Store_Function store, LV2_State_Handle state_handle, uint32_t flags, const LV2_Feature* const* features); |
There was a problem hiding this comment.
in order to make things consistent, these 2 calls should go inside the class
| plugin->URIDs.atom_Path = plugin->urid_map->map(plugin->urid_map->handle,LV2_ATOM__Path); | ||
| plugin->URIDs.switch_channel = plugin->urid_map->map(plugin->urid_map->handle,CHANNEL_URI); | ||
| } | ||
| } |
There was a problem hiding this comment.
add a break after handling urid map, as there is no need to check any more features afterwards
|
|
||
| plug:channel | ||
| a lv2:Parameter ; | ||
| rdfs:label "channel" ; |
There was a problem hiding this comment.
this should have a default, min and max value. same semantics as a regular control port
There was a problem hiding this comment.
that said, exposing such a parameter is a bad idea. we would need an atom input and output port to get things integrated in the host properly. which is kinda pointless in this plugin.
so best is to not have such parameter exposed at all, as it complicates things
| """; | ||
|
|
||
| lv2:requiredFeature urid:map ; | ||
| lv2:optionalFeature state:loadDefaultState ; |
There was a problem hiding this comment.
you need to define the default state if you want to have this property.
| ]; | ||
|
|
||
| patch:writable plug:channel ; | ||
| patch:state plug:channel ; |
No description provided.