From bbe8bb0ae9f0d2e864c82b6262cd4c2ef4da865a Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Fri, 23 Jun 2017 21:04:43 +0200 Subject: ao_pulse: reorder format choice Right now, the current order pretty much means that pulse defaults to S16 for arbitrary unsupported formats, but fallback to float would make more sense since it's the easiest to convert everything to without requiring dithering, and PA will probably just internally convert things to float anyway. Also move S32 above S16, which essentially means format_maps is sorted by preference. (Although ao_pulse currently ignores this and always picks the first as a fallback) --- audio/out/ao_pulse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'audio') diff --git a/audio/out/ao_pulse.c b/audio/out/ao_pulse.c index ae9b3c5a8d..41fce3309f 100644 --- a/audio/out/ao_pulse.c +++ b/audio/out/ao_pulse.c @@ -191,9 +191,9 @@ static const struct format_map { int mp_format; pa_sample_format_t pa_format; } format_maps[] = { - {AF_FORMAT_S16, PA_SAMPLE_S16NE}, - {AF_FORMAT_S32, PA_SAMPLE_S32NE}, {AF_FORMAT_FLOAT, PA_SAMPLE_FLOAT32NE}, + {AF_FORMAT_S32, PA_SAMPLE_S32NE}, + {AF_FORMAT_S16, PA_SAMPLE_S16NE}, {AF_FORMAT_U8, PA_SAMPLE_U8}, {AF_FORMAT_UNKNOWN, 0} }; -- cgit v1.2.3