1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-18 12:55:16 +00:00
mpv/audio/out
wm4 396756e58a ao_oss: prevent hang when unpausing after device was lost
Pausing/unpausing while the audio device can't be reopened, and then
unpausing again when the device is finally reopened, can hang the
player for a while.

This happens because p->prepause_samples grows without bounds each
time the player is unpaused while the device is lost. On unpause,
ao_oss plays prepause_samples of silence to compensate for A/V timing
issues due to the partially lost buffer (we can't pause the device at
an arbitrary sample position, and the current period will be lost).
This in turn will make the player appear to be frozen if too much
audio is queued. (Normally, play() must never block, but here it
happens because more data is written than get_space() reports. A
better implementation would never let prepause_samples grow larger
than the period size.)

The unbounded growth happens because get_space() always returns that
the device can be written while the device is lost. So limit it to
200ms. (A better implementation would limit it to the period size.)

Also see #1080.
2014-09-17 00:33:40 +02:00
..
ao_alsa.c audio/out: always round get_space on period size 2014-09-06 12:59:00 +02:00
ao_coreaudio_device.c coreaudio_device: fix overwriting of user input 2014-08-25 10:08:54 +02:00
ao_coreaudio_properties.c
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: move channel mapping away from utils 2014-07-02 21:43:08 +02:00
ao_coreaudio_utils.h ao_coreaudio: move channel mapping away from utils 2014-07-02 21:43:08 +02:00
ao_coreaudio.c audio/out: remove old things 2014-09-06 02:30:57 +02:00
ao_dsound.c audio/out: always round get_space on period size 2014-09-06 12:59:00 +02:00
ao_jack.c audio/out/pull: remove race conditions 2014-05-29 02:24:17 +02:00
ao_lavc.c Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
ao_null.c audio/out: always round get_space on period size 2014-09-06 12:59:00 +02:00
ao_openal.c audio/out: remove old things 2014-09-06 02:30:57 +02:00
ao_oss.c ao_oss: prevent hang when unpausing after device was lost 2014-09-17 00:33:40 +02:00
ao_pcm.c ao_pcm: minor simplification 2014-09-06 12:58:54 +02:00
ao_portaudio.c audio/out/pull: remove race conditions 2014-05-29 02:24:17 +02:00
ao_pulse.c ao_pulse: dump library version etc. 2014-09-10 23:14:06 +02:00
ao_rsound.c ao_rsound: pass correct data type to rsd_set_param() 2014-03-09 19:11:49 +01:00
ao_sdl.c audio/out/pull: remove race conditions 2014-05-29 02:24:17 +02:00
ao_sndio.c audio/out: always round get_space on period size 2014-09-06 12:59:00 +02:00
ao_wasapi_utils.c ao_wasapi: simplify nAvgBytesPerSec calculation 2014-05-28 21:38:15 +02:00
ao_wasapi_utils.h ao_wasapi: Move non-critical code outside of the event thread 2014-03-11 16:37:02 -03:00
ao_wasapi.c audio/out: remove old things 2014-09-06 02:30:57 +02:00
ao_wasapi.h Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
ao.c audio/out: remove old things 2014-09-06 02:30:57 +02:00
ao.h audio/out: remove old things 2014-09-06 02:30:57 +02:00
internal.h audio/out: remove old things 2014-09-06 02:30:57 +02:00
pull.c audio/out: make EOF handling properly event-based 2014-09-05 23:45:54 +02:00
push.c audio/out: fix active waiting during pause again 2014-09-06 16:25:27 +02:00