update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6806 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
3526529f63
commit
4945769369
|
@ -211,7 +211,7 @@ int teletone_multi_tone_detect (teletone_multi_tone_t *mt,
|
||||||
int16_t sample_buffer[],
|
int16_t sample_buffer[],
|
||||||
int samples)
|
int samples)
|
||||||
{
|
{
|
||||||
int sample, limit, j, x = 0;
|
int sample, limit = 0, j, x = 0;
|
||||||
float v1, famp;
|
float v1, famp;
|
||||||
float eng_sum = 0, eng_all[TELETONE_MAX_TONES];
|
float eng_sum = 0, eng_all[TELETONE_MAX_TONES];
|
||||||
int gtest = 0, see_hit = 0;
|
int gtest = 0, see_hit = 0;
|
||||||
|
@ -224,6 +224,9 @@ int teletone_multi_tone_detect (teletone_multi_tone_t *mt,
|
||||||
} else {
|
} else {
|
||||||
limit = samples;
|
limit = samples;
|
||||||
}
|
}
|
||||||
|
if (limit < 0 || limit > samples) {
|
||||||
|
limit = samples;
|
||||||
|
}
|
||||||
|
|
||||||
for (j = sample; j < limit; j++) {
|
for (j = sample; j < limit; j++) {
|
||||||
famp = sample_buffer[j];
|
famp = sample_buffer[j];
|
||||||
|
|
Loading…
Reference in New Issue