Use logging

This commit is contained in:
2025-01-14 23:33:30 -05:00
parent 102aff1580
commit f031bb17b2
7 changed files with 148 additions and 17 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ use anyhow::{bail, Result};
use cpal::traits::{DeviceTrait, HostTrait, StreamTrait};
use itertools::Itertools;
use rubato::{FftFixedInOut, Resampler};
use tracing::error;
pub struct Audio {
#[allow(unused)]
@@ -54,7 +55,7 @@ impl Audio {
}
chunk.commit_all();
},
move |err| eprintln!("stream error: {err}"),
move |error| error!(%error, "stream error"),
None,
)?;
stream.play()?;