Conversation
|
With only one monitored frequency, super_tone_chunk() short-circuited to
Read state[0], apply the same tone-to-total-energy test as the multi Also handle monitored_frequencies == 0, which happens for a descriptor else
{
if (s->desc->monitored_frequencies < 1)
{
k1 = -1;
k2 = -1;
}
else if (s->desc->monitored_frequencies < 2)
{
res[0] = goertzel_result(&s->state[0]);
if (res[0] < tone_to_total_energy*s->energy)
{
k1 = -1;
k2 = -1;
}
else
{
k1 = 0;
k2 = -1;
}
/*endif*/
}
else
{
/* Find our two best monitored frequencies, which also have adequate energy. */
...
}
/*endif*/
} |
I have already made the changes and submitted them. |
When only freq1 is configured and freq2 is set to zero, detection cannot be performed.
for example