Use comptime for fully declarative LV2 and Custom commands #14
2 changed files with 8 additions and 9 deletions
|
@ -185,7 +185,8 @@ pub fn main() !void {
|
||||||
const scri_path = try (args_it.next(allocator) orelse @panic("expected scri path or 'repl'"));
|
const scri_path = try (args_it.next(allocator) orelse @panic("expected scri path or 'repl'"));
|
||||||
|
|
||||||
if (std.mem.eql(u8, scri_path, "repl")) {
|
if (std.mem.eql(u8, scri_path, "repl")) {
|
||||||
return try doRepl(allocator, &args_it);
|
@panic("TODO bring repl back");
|
||||||
|
// return try doRepl(allocator, &args_it);
|
||||||
}
|
}
|
||||||
|
|
||||||
var file = try std.fs.cwd().openFile(scri_path, .{});
|
var file = try std.fs.cwd().openFile(scri_path, .{});
|
||||||
|
|
|
@ -374,6 +374,8 @@ pub const Runner = struct {
|
||||||
try image.runPlugin("http://calf.sourceforge.net/plugins/VintageDelay", pos, params);
|
try image.runPlugin("http://calf.sourceforge.net/plugins/VintageDelay", pos, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn newRunCommand(self: *@This(), cmd: lang.NewCommand) !void {}
|
||||||
|
|
||||||
fn runCommand(self: *Runner, cmd: *lang.Command) !void {
|
fn runCommand(self: *Runner, cmd: *lang.Command) !void {
|
||||||
var params = ParamList.init(self.allocator);
|
var params = ParamList.init(self.allocator);
|
||||||
defer params.deinit();
|
defer params.deinit();
|
||||||
|
@ -775,14 +777,10 @@ pub const Runner = struct {
|
||||||
cmds: lang.CommandList,
|
cmds: lang.CommandList,
|
||||||
debug_flag: bool,
|
debug_flag: bool,
|
||||||
) !void {
|
) !void {
|
||||||
for (cmds.items) |const_cmd| {
|
for (cmds.items) |cmd| {
|
||||||
if (debug_flag) const_cmd.print();
|
// TODO
|
||||||
|
// if (debug_flag) const_cmd.print();
|
||||||
// copy the command so we own its memory
|
try self.newRunCommand(cmd);
|
||||||
var cmd = try const_cmd.copy(self.allocator);
|
|
||||||
defer self.allocator.destroy(cmd);
|
|
||||||
|
|
||||||
try self.runCommand(cmd);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue