0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00
mpv/audio/out
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
..
ao_alsa.c ao_alsa: filter audio device list 2015-11-24 19:47:58 +01:00
ao_coreaudio_chmap.c ao_coreaudio_exclusive: fallback to stereo on unknown channel layouts 2015-10-26 15:55:11 +01:00
ao_coreaudio_chmap.h ao_coreaudio_exclusive: deal with devices return different channel count 2015-10-21 18:54:48 +02:00
ao_coreaudio_exclusive.c ao_coreaudio_exclusive: check for maximum channel count 2015-10-26 16:00:24 +01:00
ao_coreaudio_properties.c ao_coreaudio: use device UID instead of ID for selection 2015-02-03 00:40:02 +01:00
ao_coreaudio_properties.h ao_coreaudio: report hardware latency to ao_read_data 2014-07-03 20:05:15 +02:00
ao_coreaudio_utils.c ao_coreaudio: log current format before setting new format 2015-10-21 18:53:50 +02:00
ao_coreaudio_utils.h ao_coreaudio: fix device latency, share the code 2015-07-06 17:49:28 +02:00
ao_coreaudio.c ao_coreaudio: avoid unnecessary format changes 2015-10-21 18:54:36 +02:00
ao_dsound.c win32: revert wchar_t changes 2015-08-01 21:09:11 +02:00
ao_jack.c ao_jack: remove "alsa" std-channel-layout choice 2015-11-07 15:20:34 +01:00
ao_lavc.c audio: use AVFrames with more than 8 channels correctly 2015-10-26 15:54:00 +01:00
ao_null.c ao_null: add an option for testing channel layout selection 2015-04-27 23:21:58 +02:00
ao_openal.c ao_openal: fix sign of speaker angle in comment 2015-11-18 08:27:47 -08:00
ao_oss.c ao_oss: use new sample format determination code 2015-09-10 23:39:46 +02:00
ao_pcm.c audio: fix format function consistency issues 2015-06-26 23:06:37 +02:00
ao_pulse.c ao_pulse: attempt to fall back to an arbitrary sample format 2016-01-05 19:52:05 +01:00
ao_rsound.c audio: remove S8, U16, U24, U32 formats 2015-06-16 21:11:59 +02:00
ao_sdl.c audio: remove S8, U16, U24, U32 formats 2015-06-16 21:11:59 +02:00
ao_sndio.c ao_sndio: fix comment 2015-06-26 23:03:37 +02:00
ao_wasapi_changenotify.c ao_wasapi: remove +x flag from files 2016-01-04 19:18:02 +01:00
ao_wasapi_utils.c ao_wasapi: remove +x flag from files 2016-01-04 19:18:02 +01:00
ao_wasapi_utils.h ao_wasapi: remove +x flag from files 2016-01-04 19:18:02 +01:00
ao_wasapi.c ao_wasapi: make persistent enumerator local to change_notify 2016-01-04 07:41:21 -08:00
ao_wasapi.h ao_wasapi: remove +x flag from files 2016-01-04 19:18:02 +01:00
ao.c ao: disambiguate default device list entries 2015-11-27 14:42:10 +01:00
ao.h audio: add option for falling back to ao_null 2015-10-05 19:12:23 +02:00
internal.h ao: make better use of atomics 2015-05-11 23:27:41 +02:00
pull.c Fix some typos in code comments 2015-12-21 22:28:12 +01:00
push.c audio: fix format function consistency issues 2015-06-26 23:06:37 +02:00