mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
fix note timings (#449)
This commit is contained in:
committed by
GitHub
parent
2dfd5d994f
commit
b23d46f254
@@ -86,9 +86,9 @@ impl SoundInterface {
|
|||||||
) -> Result<(), Error> {
|
) -> Result<(), Error> {
|
||||||
{
|
{
|
||||||
self.play(note).await?;
|
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?;
|
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(())
|
Ok(())
|
||||||
}
|
}
|
||||||
.or_else(|e: Error| {
|
.or_else(|e: Error| {
|
||||||
|
|||||||
Reference in New Issue
Block a user