make Embed follow existing custom plugin structure
This commit is contained in:
parent
e669b74ffb
commit
e8808c501b
2 changed files with 5 additions and 8 deletions
|
@ -140,10 +140,10 @@ pub const Embed = struct {
|
|||
sndfile: *c.SNDFILE = undefined,
|
||||
buf: []f32 = undefined,
|
||||
|
||||
pub fn init(allocator: *std.mem.Allocator, filepath: []const u8) @This() {
|
||||
pub fn init(allocator: *std.mem.Allocator, params: *plugins.ParmaMap) @This() {
|
||||
return Embed{
|
||||
.allocator = allocator,
|
||||
.filepath = filepath,
|
||||
.filepath = params.get("path").?,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
const std = @import("std");
|
||||
|
||||
const plugin = @import("plugin.zig");
|
||||
const custom = @import("custom.zig");
|
||||
|
||||
pub const ParseError = error{
|
||||
OutOfMemory,
|
||||
|
@ -188,13 +189,9 @@ pub const Command = struct {
|
|||
data: f32,
|
||||
});
|
||||
|
||||
pub const Embed = struct {
|
||||
pub const base_tag = Tag.embed;
|
||||
base: Command,
|
||||
split: usize,
|
||||
index: usize,
|
||||
pub const Embed = CustomCommand(Tag.write, custom.Embed, struct {
|
||||
path: []const u8,
|
||||
};
|
||||
});
|
||||
|
||||
pub const Rotate = struct {
|
||||
pub const base_tag = Tag.rotate;
|
||||
|
|
Loading…
Reference in a new issue