]> git.ipfire.org Git - thirdparty/asterisk.git/commit
dsp.c: Improve debug logging in tone_detect().
authorNaveen Albert <asterisk@phreaknet.org>
Fri, 15 Aug 2025 12:32:00 +0000 (08:32 -0400)
committerAsterisk Development Team <asteriskteam@digium.com>
Wed, 10 Sep 2025 19:53:00 +0000 (19:53 +0000)
commit7255de7cd701f66f25be07204cb56d488d003652
treef6d1521a877f65f913065319cca5395fd08f465b
parent5951994ca3d21eda24c3d01bc67e28ce64c18792
dsp.c: Improve debug logging in tone_detect().

The debug logging during DSP processing has always been kind
of overwhelming and annoying to troubleshoot. Simplify and
improve the logging in a few ways to aid DSP debugging:

* If we had a DSP hit, don't also emit the previous debug message that
  was always logged. It is duplicated by the hit message, so this can
  reduce the number of debug messages during detection by 50%.
* Include the hit count and required number of hits in the message so
  on partial detections can be more easily troubleshot.
* Use debug level 9 for hits instead of 10, so we can focus on hits
  without all the noise from the per-frame debug message.
* 1-index the hit count in the debug messages. On the first hit, it
  currently logs '0', just as when we are not detecting anything,
  which can be confusing.

Resolves: #1375
(cherry picked from commit 286c104231afbbb38cf6f988e86afd0c7602cd91)
main/dsp.c