git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6806 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2007-12-15 15:32:41 +00:00
parent 3526529f63
commit 4945769369
1 changed files with 4 additions and 1 deletions

View File

@ -211,7 +211,7 @@ int teletone_multi_tone_detect (teletone_multi_tone_t *mt,
int16_t sample_buffer[],
int samples)
{
int sample, limit, j, x = 0;
int sample, limit = 0, j, x = 0;
float v1, famp;
float eng_sum = 0, eng_all[TELETONE_MAX_TONES];
int gtest = 0, see_hit = 0;
@ -224,6 +224,9 @@ int teletone_multi_tone_detect (teletone_multi_tone_t *mt,
} else {
limit = samples;
}
if (limit < 0 || limit > samples) {
limit = samples;
}
for (j = sample; j < limit; j++) {
famp = sample_buffer[j];