pw-cat: prefer AU format when using stdin/stdout

WAV is actually not usable for streaming output by sndfile.

See #4629
This commit is contained in:
Wim Taymans 2025-03-24 17:54:32 +01:00
parent 367e756ebe
commit dda60fb374

View file

@ -1343,7 +1343,7 @@ static void format_from_filename(SF_INFO *info, const char *filename)
}
}
if (format == -1)
format = SF_FORMAT_WAV;
format = spa_streq(filename, "-") ? SF_FORMAT_AU : SF_FORMAT_WAV;
if (format == SF_FORMAT_WAV && info->channels > 2)
format = SF_FORMAT_WAVEX;