1
Fork 0

tuned windows sampling settings for stability

This commit is contained in:
Andy Killorin 2025-03-06 20:33:23 -05:00
parent cf0a6b94d7
commit 0bef5cc6e7
Signed by: ank
GPG key ID: 23F9463ECB67FE8C

View file

@ -39,7 +39,7 @@ fn main() -> Result<()> {
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
const PACKET_LEN: usize = 2204; const PACKET_LEN: usize = 2204;
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
const PACKET_LEN: usize = 2000; const PACKET_LEN: usize = 1800;
let mut packet = Vec::new(); let mut packet = Vec::new();
@ -136,7 +136,7 @@ async fn controller(mut notes: mpsc::Receiver<(Option<pitch_detection::Pitch<f32
loop { loop {
let mut control = ControlPacket::Stop; let mut control = ControlPacket::Stop;
let result::Result::Ok(note) = timeout(Duration::from_millis(95), notes.recv()).await else { let result::Result::Ok(note) = timeout(Duration::from_millis(250), notes.recv()).await else {
println!("timeout"); println!("timeout");
send_packet(&mut controller, ControlPacket::Stop).await?; send_packet(&mut controller, ControlPacket::Stop).await?;
continue; continue;