fix output ports not using out_buf
This commit is contained in:
parent
f222c5e34f
commit
fdbed55b80
1 changed files with 3 additions and 4 deletions
|
@ -461,7 +461,7 @@ pub fn main() !void {
|
||||||
lilv_instance_connect_port(self.instance, p, &in_buf[i]);
|
lilv_instance_connect_port(self.instance, p, &in_buf[i]);
|
||||||
i += 1;
|
i += 1;
|
||||||
} else {
|
} else {
|
||||||
lilv_instance_connect_port(self.instance, p, &in_buf[o]);
|
lilv_instance_connect_port(self.instance, p, &out_buf[o]);
|
||||||
o += 1;
|
o += 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -472,11 +472,9 @@ pub fn main() !void {
|
||||||
// Ports are now connected to buffers in interleaved format, so we can run
|
// Ports are now connected to buffers in interleaved format, so we can run
|
||||||
// a single frame at a time and avoid having to interleave buffers to
|
// a single frame at a time and avoid having to interleave buffers to
|
||||||
// read/write from/to sndfile.
|
// read/write from/to sndfile.
|
||||||
std.debug.warn("almost there!\n");
|
|
||||||
|
|
||||||
lilv_instance_activate(self.instance);
|
lilv_instance_activate(self.instance);
|
||||||
|
|
||||||
const START = 2 * 44100;
|
const START = 10 * 44100;
|
||||||
// for the first START frames, copy from in to out
|
// for the first START frames, copy from in to out
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
|
@ -491,6 +489,7 @@ pub fn main() !void {
|
||||||
|
|
||||||
while (sread(self.in_file, in_fmt.channels, in_buf)) {
|
while (sread(self.in_file, in_fmt.channels, in_buf)) {
|
||||||
lilv_instance_run(self.instance, 1);
|
lilv_instance_run(self.instance, 1);
|
||||||
|
|
||||||
if (c.sf_writef_float(self.out_file, out_buf.ptr, 1) != 1) {
|
if (c.sf_writef_float(self.out_file, out_buf.ptr, 1) != 1) {
|
||||||
std.debug.warn("failed to write to output file\n");
|
std.debug.warn("failed to write to output file\n");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue