New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to extract audio from an output #23
Comments
What's the error? let mut in1 = vec![0.0; 1024]; // just to make the frame length right
let mut out1 = in1.clone();
let mut out2 = in1.clone();
{
let buffer = AudioBuffer::new(vec![&mut in1], vec![&mut out1, &mut out2]);
instance.process(buffer);
} // buffer gets dropped here
// read from out1, out2 And I think you should tell the plugin the sample rate and block size before you |
@Boscop : thanks a lot for that. I was getting errors like:
As you explained, it was because the buffer had not yet been dropped. Once I limited the scope of the buffer, and only accessed I've also taken your advice about setting up the plugin with the sample rate and block size - will take a look at loading a 'debugging-based' plugin for use in other hosts. I think that will help me also know what midi events I need to send to my current plugin to get it to work :) |
Hi - I'm afraid I'm very new to rust, so this problem is almost certainly with my understanding rather than the library. But just in case I have identified a genuine issue, here's a ticket.
I'm attempting to pass a midi note to an instrument VST, and get the audio out of that VST (with the hopes of eventually playing it ;))
The way I think rust-vst2 wants me to do this is to process the buffer using the plugin instance, and then at some later point to inspect the AudioBuffer I sent into it. However, if I attempt to access the AudioBuffer (
buffer
) or the one mutable vectors (in1
,out1
orout2
) that make it up afterinstance.process(buffer);
, I get a borrower check error.I can understand from the rust docs that this is expected behaviour, but does that then render it impossible to get audio data out of the VST?
The text was updated successfully, but these errors were encountered: