summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2017-06-23 21:04:43 +0200
committerNiklas Haas <git@haasn.xyz>2017-06-23 21:12:44 +0200
commitbbe8bb0ae9f0d2e864c82b6262cd4c2ef4da865a (patch)
treed34fdb421586bfda9eb24b76d53e6bc036be5a63 /audio
parent0744fc1c946f034b40da1c8bef549bff41bd0339 (diff)
downloadmpv-bbe8bb0ae9f0d2e864c82b6262cd4c2ef4da865a.tar.bz2
mpv-bbe8bb0ae9f0d2e864c82b6262cd4c2ef4da865a.tar.xz
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)
Diffstat (limited to 'audio')
-rw-r--r--audio/out/ao_pulse.c4
1 files changed, 2 insertions, 2 deletions
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}
};