Default to S16 output

This commit is contained in:
Roderick van Domburg 2021-03-16 20:22:00 +01:00
parent 309e26456e
commit 9dcaeee6d4
3 changed files with 4 additions and 8 deletions

View file

@ -42,14 +42,10 @@ impl ProcessHandler for JackData {
impl Open for JackSink {
fn open(client_name: Option<String>, format: AudioFormat) -> JackSink {
info!("Using JACK sink with format {:?}", format);
if format != AudioFormat::F32 {
panic!(
"JACK sink only supports 32-bit floating point output. Use `--format {:?}`",
AudioFormat::F32
);
warn!("JACK currently does not support {:?} output", format);
}
info!("Using JACK sink with format {:?}", AudioFormat::F32);
let client_name = client_name.unwrap_or("librespot".to_string());
let (client, _status) =

View file

@ -47,7 +47,7 @@ impl TryFrom<&String> for AudioFormat {
impl Default for AudioFormat {
fn default() -> AudioFormat {
AudioFormat::F32
AudioFormat::S16
}
}

View file

@ -156,7 +156,7 @@ fn setup(args: &[String]) -> Setup {
.optopt(
"",
"format",
"Output format (F32, S32 or S16). Defaults to F32",
"Output format (F32, S32 or S16). Defaults to S16",
"FORMAT",
)
.optopt("", "mixer", "Mixer to use (alsa or softvol)", "MIXER")