comparison src/alsa/audio.c @ 2987:58c63fbbd3ce

Do not use non-blocking playback, it is entirely unnecessary and is the source of many problems we have with ALSA on weird cards.
author William Pitcock <nenolod@atheme.org>
date Fri, 05 Dec 2008 07:10:58 -0600
parents 35ac6cb80680
children 8b7a44631121
comparison
equal deleted inserted replaced
2986:947ac5c18ad3 2987:58c63fbbd3ce
805 if(outputf == NULL) return -1; 805 if(outputf == NULL) return -1;
806 806
807 debug("Opening device: %s", alsa_cfg.pcm_device); 807 debug("Opening device: %s", alsa_cfg.pcm_device);
808 /* FIXME: Can snd_pcm_open() return EAGAIN? */ 808 /* FIXME: Can snd_pcm_open() return EAGAIN? */
809 if ((err = snd_pcm_open(&alsa_pcm, alsa_cfg.pcm_device, 809 if ((err = snd_pcm_open(&alsa_pcm, alsa_cfg.pcm_device,
810 SND_PCM_STREAM_PLAYBACK, 810 SND_PCM_STREAM_PLAYBACK, 0)) < 0)
811 SND_PCM_NONBLOCK)) < 0)
812 { 811 {
813 g_warning("alsa_setup(): Failed to open pcm device (%s): %s", 812 g_warning("alsa_setup(): Failed to open pcm device (%s): %s",
814 alsa_cfg.pcm_device, snd_strerror(err)); 813 alsa_cfg.pcm_device, snd_strerror(err));
815 alsa_pcm = NULL; 814 alsa_pcm = NULL;
816 g_free(outputf); 815 g_free(outputf);