Remove warning for Rodio on Alsa (fixed upstream) (#696)

This commit is contained in:
Roderick van Domburg 2021-04-15 08:42:19 +02:00 committed by GitHub
parent 4fc3accc78
commit 7226bfd55a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -152,19 +152,14 @@ fn create_sink(
}
pub fn open(host: cpal::Host, device: Option<String>, format: AudioFormat) -> RodioSink {
debug!(
"Using rodio sink with format {:?} and cpal host: {}",
info!(
"Using Rodio sink with format {:?} and cpal host: {}",
format,
host.id().name()
);
match format {
AudioFormat::F32 => {
#[cfg(target_os = "linux")]
warn!("Rodio output to Alsa is known to cause garbled sound, consider using `--backend alsa`")
}
AudioFormat::S16 => (),
_ => unimplemented!("Rodio currently only supports F32 and S16 formats"),
if format != AudioFormat::S16 && format != AudioFormat::F32 {
unimplemented!("Rodio currently only supports F32 and S16 formats");
}
let (sink, stream) = create_sink(&host, device).unwrap();