From b23d46f254d6da948a02b68caf2f150359afb8b5 Mon Sep 17 00:00:00 2001 From: Keagan McClelland Date: Tue, 7 Sep 2021 12:58:46 -0600 Subject: [PATCH] fix note timings (#449) --- appmgr/src/sound.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appmgr/src/sound.rs b/appmgr/src/sound.rs index aa2fb27be..86cbedb4c 100644 --- a/appmgr/src/sound.rs +++ b/appmgr/src/sound.rs @@ -86,9 +86,9 @@ impl SoundInterface { ) -> Result<(), Error> { { self.play(note).await?; - tokio::time::sleep(time_slice.to_duration((tempo_qpm as u64 * 19 / 20) as u16)).await; + tokio::time::sleep(time_slice.to_duration(tempo_qpm) * 19 / 20).await; self.stop().await?; - tokio::time::sleep(time_slice.to_duration(tempo_qpm / 20)).await; + tokio::time::sleep(time_slice.to_duration(tempo_qpm) / 20).await; Ok(()) } .or_else(|e: Error| {