1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-20 06:11:10 +00:00
mpv/audio
wm4 c1002f6a28 ao_pulse: attempt to fall back to an arbitrary sample format
Normally, PulseAudio accepts any combination of sample format, sample
rate, channel count/map. Sometimes it does not. For example, the channel
rate or channel count have fixed maximum values. We should not fail
fatally in such cases, but attempt to fall back to a working format.

We could just send pass an "unset" format to Pulse, but this is not too
attractive. Pulse could use a format which we do not support, and also
doing so much for an obscure corner case is not reasonable. So just pick
a format that is very likely supported.

This still could fail at runtime (the stream could fail instead of going
to the ready state), but this sounds also too complicated. In
particular, it doesn't look like pulse will tell us the cause of the
stream failure. (Or maybe it does - but I didn't find anything.)

Last but not least, our fallback could be less dumb, and e.g. try to fix
only one of samplerate or channel count first to reduce the loss, but
this is also not particularly worthy the effort.

Fixes #2654.
2016-01-05 19:52:05 +01:00
..
decode dec_audio: add missing include 2015-11-08 20:01:20 +01:00
filter af_lavrresample: fix build on Libav 2015-11-26 00:25:28 +01:00
out ao_pulse: attempt to fall back to an arbitrary sample format 2016-01-05 19:52:05 +01:00
audio_buffer.c player: add audio drop/duplicate mode 2015-10-27 20:56:46 +01:00
audio_buffer.h player: add audio drop/duplicate mode 2015-10-27 20:56:46 +01:00
audio.c audio: use AVFrames with more than 8 channels correctly 2015-10-26 15:54:00 +01:00
audio.h audio: move PTS setting out of the decoder 2015-11-08 17:22:56 +01:00
chmap_sel.c chmap_sel: prefer inexact equivalents over perfect upmix 2016-01-04 19:17:56 +01:00
chmap_sel.h chmap: remove MPlayer layouts 2015-11-07 15:22:30 +01:00
chmap.c chmap: remove MPlayer layouts 2015-11-07 15:22:30 +01:00
chmap.h chmap: remove MPlayer layouts 2015-11-07 15:22:30 +01:00
fmt-conversion.c Update license headers 2015-04-13 12:10:01 +02:00
fmt-conversion.h Update license headers 2015-04-13 12:10:01 +02:00
format.c audio: fix af_fmt_change_bytes() with spdif formats 2015-11-07 15:07:50 +01:00
format.h ao_lavc: use new sample format determination code 2015-09-10 23:38:42 +02:00
mixer.c mixer: fix volume initialization with --af=volume 2015-12-11 20:52:37 +01:00
mixer.h audio: change range of volume option/property 2015-05-22 18:35:03 +02:00