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:
ranma 2008-10-04 15:03:10 +00:00
parent 975e5a97e2
commit 68fa9667ec
1 changed files with 4 additions and 0 deletions

View File

@ -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)
{