add runner support for LV2Command() spec

This commit is contained in:
Luna 2020-05-31 17:11:40 -03:00
parent 5412934f27
commit d09603c005

View file

@ -385,20 +385,10 @@ pub const Runner = struct {
const typ = @TypeOf(command);
inline for (@typeInfo(typ).Struct.fields) |cmd_field| {
// ignore fields that can't be symbols for lv2 execution
comptime {
if (std.mem.eql(u8, cmd_field.name, "base") or
std.mem.eql(u8, cmd_field.name, "split") or
std.mem.eql(u8, cmd_field.name, "index"))
{
continue;
}
}
inline for (@typeInfo(@TypeOf(command.parameters)).Struct.fields) |cmd_field| {
try params.append(plugin.Param{
.sym = cmd_field.name,
.value = @field(command, cmd_field.name),
.value = @field(command.parameters, cmd_field.name),
});
}