Use comptime for fully declarative LV2 and Custom commands #14
1 changed files with 1 additions and 11 deletions
|
@ -230,18 +230,8 @@ pub const Runner = struct {
|
|||
.index = command.index,
|
||||
};
|
||||
|
||||
var params = ParamMap.init(self.allocator);
|
||||
defer params.deinit();
|
||||
|
||||
inline for (@typeInfo(@TypeOf(command.parameters)).Struct.fields) |cmd_field| {
|
||||
_ = try params.put(
|
||||
cmd_field.name,
|
||||
@field(command.parameters, cmd_field.name),
|
||||
);
|
||||
}
|
||||
|
||||
var image = try self.getImage();
|
||||
try image.runCustomPlugin(@TypeOf(command).plugin_type, pos, ¶ms);
|
||||
try image.runCustomPlugin(@TypeOf(command).plugin_type, pos, command.parameters);
|
||||
}
|
||||
|
||||
fn newRunCommandSingle(
|
||||
|
|
Loading…
Reference in a new issue