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)
This commit is contained in:
Niklas Haas 2017-06-23 21:04:43 +02:00
parent 0744fc1c94
commit bbe8bb0ae9
No known key found for this signature in database
GPG Key ID: 9A09076581B27402
1 changed files with 2 additions and 2 deletions

View File

@ -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}
};