Trying to get into jack
Some checks failed
ci/woodpecker/push/code_tests Pipeline failed
ci/woodpecker/push/pre_commit_test Pipeline was successful

This commit is contained in:
2025-12-24 13:57:56 +01:00
parent 535727268d
commit a827afd872

View File

@@ -18,11 +18,9 @@ fn main() {
let rb = HeapRb::<f32>::new(128);
let (mut prod, mut cons) = rb.split();
let process_callback = move |_: &jack::Client, ps: &jack::ProcessScope| -> jack::Control {
let mut out_a_p = out_a.as_mut_slice(ps);
for v in cons.iter_mut() {
println!("{:?}", v);
out_a_p.fill(*v);
}
let out = out_a.as_mut_slice(ps);
let available = cons.pop_slice(out);
out[available..].fill(0.0);
jack::Control::Continue
};
let process = jack::contrib::ClosureProcessHandler::new(process_callback);
@@ -42,7 +40,7 @@ fn main() {
// 5. wait or do some processing while your handler is running in real time.
println!("Enter an integer value to change the frequency of the sine wave.");
while let Some(f) = read_freq() {
prod.try_push(f);
prod.try_push(1203.0).unwrap();
}
// 6. Optional deactivate. Not required since active_client will deactivate on