mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-07 04:03:53 +00:00
fix
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3805 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
3f73fd47d5
commit
e38a6e8ca7
@ -434,9 +434,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
|
||||
|
||||
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 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
|
||||
|
||||
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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user