From 2ebf5d1ea2e2dfa84e6fdfcfdeadcc737d0d3f25 Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Wed, 24 Dec 2025 14:02:36 +0100 Subject: [PATCH] Some sounds are already produced --- src/main.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index d5f426d..fcf8904 100644 --- a/src/main.rs +++ b/src/main.rs @@ -40,7 +40,8 @@ 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(1203.0).unwrap(); + println!("Pushing to the prod"); + prod.try_push(f); } // 6. Optional deactivate. Not required since active_client will deactivate on @@ -52,9 +53,10 @@ fn main() { } fn read_freq() -> Option { - let mut user_input = String::new(); - match io::stdin().read_line(&mut user_input) { - Ok(_) => u16::from_str(user_input.trim()).ok().map(|n| n as f32), - Err(_) => None, - } + Some(10000.0) + //let mut user_input = String::new(); + //match io::stdin().read_line(&mut user_input) { + // Ok(_) => u16::from_str(user_input.trim()).ok().map(|n| n as f32), + // Err(_) => None, + //} }