0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 20:03:10 +02:00
mpv/audio
wm4 9b3bf76d27 ao_alsa: do not call snd_pcm_delay() when paused
This causes trouble when a hw device is used:

    pcm_hw.c:514:(snd_pcm_hw_delay) SNDRV_PCM_IOCTL_DELAY failed (-77): File descriptor in bad state

when running mpv test.mkv --ao=alsa:device=iec958,alsa and pausing
during playback.

Historically, mplayer usually did not call snd_pcm_delay() (which is
called by get_delay()) while paused, so this problem never showed up.
But at least mpv has changes that cause get_delay() to be called when
updating the status line (see commit 3f949cf).

It's possible that calling snd_pcm_delay() is not always legal when the
audio is paused, and at least fails with the error message mentioned
above is the device is a hardware device. Change get_delay() to return
the last delay before the audio was paused. The intention is to get a
continuous playback status display, even when pausing or frame stepping,
otherwise we could just return the audio buffer fill status in
get_delay() or even just 0 when paused.
2013-01-06 19:28:08 +01:00
..
decode audio: make de-planarization faster 2012-12-28 13:43:55 +01:00
filter path: add mp_find_config_file and reorganize some of the code 2012-12-15 17:38:00 +01:00
out ao_alsa: do not call snd_pcm_delay() when paused 2013-01-06 19:28:08 +01:00
format.c audio: remove support for native alaw/mulaw/adpcm output 2012-12-11 00:37:54 +01:00
format.h audio: remove support for native alaw/mulaw/adpcm output 2012-12-11 00:37:54 +01:00
mixer.c mixer: fix lowering hw volume while muted 2012-11-14 00:46:15 +01:00
mixer.h Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
reorder_ch.c audio: make de-planarization faster 2012-12-28 13:43:55 +01:00
reorder_ch.h audio: make de-planarization faster 2012-12-28 13:43:55 +01:00