|
From: <st...@us...> - 2003-06-11 23:09:03
|
Update of /cvsroot/iaxclient/iaxclient/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv5672
Modified Files:
audio_encode.c iaxclient_lib.c
Log Message:
some IAX2 changes.
a relatively trivial change to audio_encode (fixed 40ms worth of noise
at the beginning of a call, but most importantly, it makes valgrind
happy).
Index: audio_encode.c
===================================================================
RCS file: /cvsroot/iaxclient/iaxclient/lib/audio_encode.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- audio_encode.c 11 Jun 2003 16:39:01 -0000 1.6
+++ audio_encode.c 11 Jun 2003 23:09:00 -0000 1.7
@@ -42,7 +42,7 @@
static int input_postprocess(void *audio, int len, void *out)
{
- int l = len;
+ unsigned long ilen,olen;
double volume;
static double lowest_volume = 1;
@@ -57,7 +57,15 @@
st_compand_start(&input_compand, argv, 5);
}
- st_compand_flow(input_compand, audio, out, &l, &l);
+
+ ilen=olen=len;
+ st_compand_flow(input_compand, audio, out, &ilen, &olen);
+
+ /* until the compander fills it's buffer, it might not put out full
+ * buffers worth of data. So, clear it unless it's all valid
+ * (also, this helps shut up valgrind :) */
+ if(olen != len)
+ memset(out,0,len*2);
do_level_callback();
Index: iaxclient_lib.c
===================================================================
RCS file: /cvsroot/iaxclient/iaxclient/lib/iaxclient_lib.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- iaxclient_lib.c 11 Jun 2003 20:15:54 -0000 1.15
+++ iaxclient_lib.c 11 Jun 2003 23:09:00 -0000 1.16
@@ -295,7 +295,10 @@
switch(e->etype) {
case IAX_EVENT_HANGUP:
+#ifndef IAXC_IAX2 /* IAX2 barfs from this. Should we do this or not? */
+
iax_hangup(most_recent_answer->session, "Byeee!");
+#endif
iaxc_usermsg(IAXC_STATUS, "Call disconnected by remote");
free(most_recent_answer);
most_recent_answer = 0;
|