tuned windows sampling settings for stability
This commit is contained in:
parent
cf0a6b94d7
commit
0bef5cc6e7
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue