mpv/audio/out
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
..
ao.c vo/ao: SDL 1.2+ audio driver, SDL 2.0+ accelerated video driver 2012-12-28 08:40:28 +01:00
ao.h cleanup: remove ao.brokenpts 2012-12-12 23:05:57 +01:00
ao_alsa.c ao_alsa: do not call snd_pcm_delay() when paused 2013-01-06 19:28:08 +01:00
ao_coreaudio.c ao_coreaudio: fix deprecation warnings 2012-11-13 22:19:18 +01:00
ao_dsound.c
ao_jack.c
ao_lavc.c sdl, encode_lavc: fix copyright headers 2012-12-28 11:41:30 +01:00
ao_null.c
ao_openal.c
ao_oss.c audio: remove support for native alaw/mulaw/adpcm output 2012-12-11 00:37:54 +01:00
ao_pcm.c ao_pcm: fix references to -novideo 2012-12-03 21:08:48 +01:00
ao_portaudio.c
ao_pulse.c audio: remove support for native alaw/mulaw/adpcm output 2012-12-11 00:37:54 +01:00
ao_rsound.c audio: remove support for native alaw/mulaw/adpcm output 2012-12-11 00:37:54 +01:00
ao_sdl.c ao_sdl: fix compilation with Libav 2013-01-06 16:04:17 +01:00
audio_out_internal.h