Use comptime for fully declarative LV2 and Custom commands #14
1 changed files with 1 additions and 0 deletions
|
@ -3,6 +3,7 @@ const langs = @import("lang.zig");
|
|||
|
||||
fn printCommandWithParams(stream: var, command: var) !void {
|
||||
const Parameters = @TypeOf(command.parameters);
|
||||
try stream.print(" {} {}", .{ command.split, command.index });
|
||||
inline for (@typeInfo(Parameters).Struct.fields) |field| {
|
||||
if (field.field_type == f32 or field.field_type == f64) {
|
||||
try stream.print(" {d}", .{@field(command.parameters, field.name)});
|
||||
|
|
Loading…
Reference in a new issue