]> 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)
committerGeorge Joseph <gjoseph@sangoma.com>
Wed, 17 Sep 2025 17:40:38 +0000 (11:40 -0600)
commitae82182768b322a83857da359ac0fcf486f820ab
treefc26c240d2d3dab276d9bd2332e89f5b6bacbdf6
parent29dcdde3c0cb8a598bf58744c2135e95ab682567
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 71a748363d0ce98955480da29d80f337e3f13839)
main/dsp.c