From 04aeb7dedb1284b6d594451a72d0a42fcbe03746 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Wed, 16 Apr 2008 21:43:51 +0000 Subject: [PATCH] don't hang channels (MODENDP-106) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8121 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_portaudio/mod_portaudio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mod/endpoints/mod_portaudio/mod_portaudio.c b/src/mod/endpoints/mod_portaudio/mod_portaudio.c index 92fa81dab5..5f0fd644a2 100644 --- a/src/mod/endpoints/mod_portaudio/mod_portaudio.c +++ b/src/mod/endpoints/mod_portaudio/mod_portaudio.c @@ -539,13 +539,12 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch return SWITCH_STATUS_SUCCESS; } - switch_mutex_lock(globals.device_lock); get_samples: + switch_mutex_lock(globals.device_lock); if ((samples = ReadAudioStream(globals.audio_stream, globals.read_frame.data, globals.read_codec.implementation->samples_per_frame, &globals.timer)) == 0) { - switch_mutex_unlock(globals.device_lock); switch_yield(1000); goto get_samples; } else {