[Asterisk-cvs] zaptel fxotune.c,1.22,1.23
mattf
mattf
Fri Aug 26 12:53:45 CDT 2005
Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/tmp/cvs-serv7368
Modified Files:
fxotune.c
Log Message:
Improvements to fxotune. It should work now :-)
Index: fxotune.c
===================================================================
RCS file: /usr/cvsroot/zaptel/fxotune.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- fxotune.c 11 Aug 2005 14:48:42 -0000 1.22
+++ fxotune.c 26 Aug 2005 16:55:25 -0000 1.23
@@ -84,10 +84,7 @@
numsamples = bufsize / 2;
for (i = 0; i < numsamples; i++) {
-#if 0
- sum_of_squares += ((float)sbuf[i] * (float)sbuf[i])/(float)32768;
-#endif
- sum_of_squares += ((float)sbuf[i] * (float)sbuf[i]);
+ sum_of_squares += ((float)sbuf[i] * (float)sbuf[i])/(float)loudness;
if (sbuf[i] > 0) {
square_of_sums += (float)sbuf[i];
} else {
@@ -532,10 +529,10 @@
printf("Tuning module %d", i + 1);
res = acim_tune(fd, argv[2]); /* Shouldn't matter what digit we press */
- if (!res)
- printf("Done!\n");
- else
+ if (res < 0)
printf("Failure!\n");
+ else
+ printf("Done!\n");
close(fd);
if (res > -1) {
More information about the svn-commits
mailing list