let multitone support unitone

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4685 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2007-03-20 18:10:21 +00:00
parent dab4fbff55
commit ec23a61287
1 changed files with 1 additions and 1 deletions

View File

@ -217,7 +217,7 @@ int teletone_multi_tone_detect (teletone_multi_tone_t *mt,
gtest += teletone_goertzel_result (&mt->gs2[x]) < eng_all[x] ? 1 : 0;
}
if (gtest >= 2 && eng_sum > 42.0 * mt->energy) {
if ((gtest >= 2 || gtest == mt->tone_count) && eng_sum > 42.0 * mt->energy) {
if(mt->negatives) {
mt->negatives--;
}