Warn about broken backends

This commit is contained in:
Roderick van Domburg 2021-03-27 22:53:05 +01:00
parent cc60dc11dc
commit d252eeedc5
2 changed files with 4 additions and 2 deletions

View file

@ -55,6 +55,9 @@ impl<'a> Open for PortAudioSink<'a> {
fn open(device: Option<String>, format: AudioFormat) -> PortAudioSink<'a> {
info!("Using PortAudio sink with format: {:?}", format);
warn!("This backend is known to panic on several platforms.");
warn!("Consider using some other backend, or better yet, contributing a fix.");
portaudio_rs::initialize().unwrap();
let device_idx = match device.as_ref().map(AsRef::as_ref) {

View file

@ -54,8 +54,7 @@ macro_rules! rodio_sink {
AudioFormat::F32 => {
#[cfg(target_os = "linux")]
{
warn!("Rodio output to Alsa is known to cause garbled sound on output formats other than 16-bit signed integer.");
warn!("Consider using `--backend alsa` OR `--format {:?}`", AudioFormat::S16);
warn!("Rodio output to Alsa is known to cause garbled sound, consider using `--backend alsa`");
}
},
AudioFormat::S16 => {},