~ubuntu-branches/ubuntu/vivid/mpv/vivid

« back to all changes in this revision

Viewing changes to audio/out/ao_alsa.c

  • Committer: Package Import Robot
  • Author(s): Alessandro Ghedini
  • Date: 2014-01-06 21:19:23 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20140106211923-d3tdivkl4fgu3mt1
Tags: 0.3.2-1
* New upstream release
* Default to gcc-4.8 on powerpcspe too (Closes: #733924)

Show diffs side-by-side

added added

removed removed

Lines of Context:
585
585
 
586
586
    if (snd_pcm_state(p->alsa) == SND_PCM_STATE_SUSPENDED) {
587
587
        MP_INFO(ao, "PCM in suspend mode, trying to resume.\n");
 
588
 
588
589
        while ((err = snd_pcm_resume(p->alsa)) == -EAGAIN)
589
590
            sleep(1);
590
591
    }
 
592
 
591
593
    if (p->can_pause) {
592
594
        err = snd_pcm_pause(p->alsa, 0);
593
595
        CHECK_ALSA_ERROR("pcm resume error");
639
641
            /* nothing to do */
640
642
            res = 0;
641
643
        } else if (res == -ESTRPIPE) {  /* suspend */
642
 
            MP_INFO(ao, "PCM in suspend mode, trying to resume.\n");
643
 
            while ((res = snd_pcm_resume(p->alsa)) == -EAGAIN)
644
 
                sleep(1);
645
 
        }
646
 
        if (res < 0) {
 
644
            audio_resume(ao);
 
645
        } else if (res < 0) {
647
646
            MP_ERR(ao, "Write error: %s\n", snd_strerror(res));
648
647
            res = snd_pcm_prepare(p->alsa);
649
648
            int err = res;