remove unecessary allocation in RunContext

This commit is contained in:
Luna 2019-08-06 19:25:47 -03:00
parent 75eeea14f3
commit fc3972d65c

View file

@ -99,12 +99,6 @@ pub const RunContext = struct {
return ImageError.InstantiateFail; return ImageError.InstantiateFail;
} }
// we allocate []f32 with size 2 to account for stereo plugins, however
// we only use &in_buf[0] and &out_buf[0], and don't use the
// (supposedly) right side of neither input or output.
var in_buf = try allocator.alloc(f32, 2);
std.mem.secureZero(f32, in_buf);
return RunContext{ return RunContext{
.buffers = try RunBuffers.init(allocator), .buffers = try RunBuffers.init(allocator),
.instance = instance.?, .instance = instance.?,