Use logging
This commit is contained in:
+2
-1
@@ -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()?;
|
||||
|
||||
Reference in New Issue
Block a user