[Freeswitch-trunk] [commit] r3805 - freeswitch/trunk/src
Freeswitch SVN
mikej at freeswitch.org
Fri Dec 22 16:31:48 EST 2006
Author: mikej
Date: Fri Dec 22 16:31:47 2006
New Revision: 3805
Modified:
freeswitch/trunk/src/switch_ivr.c
Log:
fix
Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c (original)
+++ freeswitch/trunk/src/switch_ivr.c Fri Dec 22 16:31:47 2006
@@ -434,9 +434,9 @@
if (fh->thresh) {
if (fh->silence_hits) {
- fh->silence_hits = fh->samplerate * fh->silence_hits;
+ fh->silence_hits = fh->samplerate * fh->silence_hits / read_codec->implementation->samples_per_frame;
} else {
- fh->silence_hits = fh->samplerate * 3;
+ fh->silence_hits = fh->samplerate * 3 / read_codec->implementation->samples_per_frame;
}
org_silence_hits = fh->silence_hits;
}
@@ -504,8 +504,7 @@
score = (uint32_t)(energy / samples);
if (score < fh->thresh) {
- fh->silence_hits -= fh->samplerate;
- if (fh->silence_hits <= 0) {
+ if (!--fh->silence_hits) {
break;
}
} else {
More information about the Freeswitch-trunk
mailing list