Use comptime for fully declarative LV2 and Custom commands #14

Merged
luna merged 69 commits from declarative-commands into master 2020-06-02 21:37:47 +00:00
Showing only changes of commit 10b2c69605 - Show all commits

View file

@ -13,6 +13,8 @@ pub const CommandType = enum {
/// "LV2 Commands" are commands that receive split, index, and then receive /// "LV2 Commands" are commands that receive split, index, and then receive
/// any f64 arguments. /// any f64 arguments.
lv2_command, lv2_command,
custom_command,
}; };
fn LV2Command( fn LV2Command(
@ -33,19 +35,19 @@ fn LV2Command(
} }
fn CustomCommand( fn CustomCommand(
comptime tag: Command.tag, comptime tag: Command.Tag,
comptime plugin: type, comptime Plugin: type,
comptime parameters: type, comptime PluginParameters: type,
) type { ) type {
return struct { return struct {
pub const base_tag = tag; pub const base_tag = tag;
pub const command_type = CommandType.plugin_command; pub const command_type = CommandType.custom_command;
pub const plugin_type = plugin; pub const plugin_type = Plugin;
base: Command, base: Command,
split: usize, split: usize,
index: usize, index: usize,
parameters: LV2Parameters, parameters: PluginParameters,
}; };
} }