]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Use the right flag to open the audio in non-blocking.
authorJoshua Colp <jcolp@digium.com>
Tue, 13 May 2008 20:28:23 +0000 (20:28 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 13 May 2008 20:28:23 +0000 (20:28 +0000)
(closes issue #12616)
Reported by: nicklewisdigiumuser

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115944 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_alsa.c

index 9a416837bccb6f0f63177364798ca7fb3cfc033d..d5817493f25e0a7f582e4aa432276e6085b20c20 100644 (file)
@@ -105,7 +105,6 @@ static snd_pcm_format_t format = SND_PCM_FORMAT_S16_LE;
 static snd_pcm_format_t format = SND_PCM_FORMAT_S16_BE;
 #endif
 
-/* static int block = O_NONBLOCK; */
 static char indevname[50] = ALSA_INDEV;
 static char outdevname[50] = ALSA_OUTDEV;
 
@@ -360,7 +359,7 @@ static snd_pcm_t *alsa_card_init(char *dev, snd_pcm_stream_t stream)
        /* unsigned int per_max = 8; */
        snd_pcm_uframes_t start_threshold, stop_threshold;
 
-       err = snd_pcm_open(&handle, dev, stream, O_NONBLOCK);
+       err = snd_pcm_open(&handle, dev, stream, SND_PCM_NONBLOCK);
        if (err < 0) {
                ast_log(LOG_ERROR, "snd_pcm_open failed: %s\n", snd_strerror(err));
                return NULL;