Open phstrauss opened 1 month ago
Data should be initialized in the "constructor" of your Process
object. Example:
pub struct Process {
left: jack::Port<AudioInPort>,
right: jack::Port<AudioInPort>,
}
impl Process {
fn new(client: &Client) -> Result<Process, jack::Error> {
Ok(Process{
left: client.register_port("in_l", jack::AudioIn::default())?,
right: client.register_port("in_r", jack::AudioIn::default())?,
})
}
}
Thanks for being my Rust teacher for 5 minutes :-)
In the following code, a non-closure process handler, how do I pass user data to the jack process handler, like the ports and float buffers for interfacing with the non-RT (GUI) part of my app? Many thanks for sharing rust-jack!