mirror of https://github.com/mpv-player/mpv
Make alsa resume after suspend to disk (would say 'file descriptor is in bad state' before this change)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27712 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
975e5a97e2
commit
68fa9667ec
|
@ -765,6 +765,10 @@ static void audio_resume(void)
|
|||
{
|
||||
int err;
|
||||
|
||||
if (snd_pcm_state(alsa_handler) == SND_PCM_STATE_SUSPENDED) {
|
||||
mp_msg(MSGT_AO,MSGL_INFO,MSGTR_AO_ALSA_PcmInSuspendModeTryingResume);
|
||||
while ((err = snd_pcm_resume(alsa_handler)) == -EAGAIN) sleep(1);
|
||||
}
|
||||
if (alsa_can_pause) {
|
||||
if ((err = snd_pcm_pause(alsa_handler, 0)) < 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue