[svn-commits] dcb: trunk r498 - /trunk/chan_mobile.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Dec 23 01:58:27 CST 2007


Author: dcb
Date: Sun Dec 23 01:58:26 2007
New Revision: 498

URL: http://svn.digium.com/view/asterisk-addons?view=rev&rev=498
Log:
Small change for Audio Lag issue.

Modified:
    trunk/chan_mobile.c

Modified: trunk/chan_mobile.c
URL: http://svn.digium.com/view/asterisk-addons/trunk/chan_mobile.c?view=diff&rev=498&r1=497&r2=498
==============================================================================
--- trunk/chan_mobile.c (original)
+++ trunk/chan_mobile.c Sun Dec 23 01:58:26 2007
@@ -819,7 +819,8 @@
 		if ((r = sco_read(pvt->sco_socket, buf, DEVICE_FRAME_SIZE))) {
 			if (pvt->do_alignment_detection)
 				do_alignment_detection(pvt, buf, r);
-			sco_write(pvt->io_pipe[1], buf, r);
+			if (ast->_state == AST_STATE_UP)	/* Dont queue the audio in the pipe if the call is not up yet. just toss it. */
+				sco_write(pvt->io_pipe[1], buf, r);
 		}
 	}
 
@@ -831,7 +832,8 @@
 		if ((r = sco_read(pvt->sco_socket, buf, DEVICE_FRAME_SIZE))) {
 			if (pvt->do_alignment_detection)
 				do_alignment_detection(pvt, buf, r);
-			sco_write(pvt->io_pipe[1], buf, r);
+			if (ast->_state == AST_STATE_UP)
+				sco_write(pvt->io_pipe[1], buf, r);
 		}
 		pfr += DEVICE_FRAME_SIZE;
 	}




More information about the svn-commits mailing list