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'"));
|
||||
|
||||
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, .{});
|
||||
|
|
|
@ -374,6 +374,8 @@ pub const Runner = struct {
|
|||
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 {
|
||||
var params = ParamList.init(self.allocator);
|
||||
defer params.deinit();
|
||||
|
@ -775,14 +777,10 @@ pub const Runner = struct {
|
|||
cmds: lang.CommandList,
|
||||
debug_flag: bool,
|
||||
) !void {
|
||||
for (cmds.items) |const_cmd| {
|
||||
if (debug_flag) const_cmd.print();
|
||||
|
||||
// copy the command so we own its memory
|
||||
var cmd = try const_cmd.copy(self.allocator);
|
||||
defer self.allocator.destroy(cmd);
|
||||
|
||||
try self.runCommand(cmd);
|
||||
for (cmds.items) |cmd| {
|
||||
// TODO
|
||||
// if (debug_flag) const_cmd.print();
|
||||
try self.newRunCommand(cmd);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue