[asterisk-dev] dsp questions

MENEAULT Maxime maxmeneault at free.fr
Tue Nov 20 02:31:22 CST 2007


Dmitry Andrianov wrote:
> Okay, does silence means nobody using these defines and dsp.c can be
> simplified removing OLD_DSP_ROUTINES completely and doing FAX_DETECT
> unconditionally?

If you looked at dsp.c history you would have understood why is this 
silence. When new detection routines were added on dec 15 2003 (changes 
made by Steve Underwood), the define OLD_DSP_ROUTINES was added so as to 
safely add the code without breaking everything. Users that would notice 
regressions would simply define OLD_DSP_ROUTINES. It should have been 
removed when no regressions were noticed. It's completely outdated.

FAX_DETECT define was added on Mar 24 2004 because of miss detection 
(false positives) I think and because it was not really tested neither.
If you look at outdated comment on FAX_DETECT you will see NOT 
RECOMMENDED IN STABLE :)
The flag to activate fax detection was added on Jun 2004. The purpose is 
not really the same because if even if fax detection is disabled by the 
flag, processing is still done and may slow down the whole thing, 
goertzel algorithm is pretty fast but not so fast.
However what's true is that every user is suffering it by default so 
only real asterisk hackers who are really concerned about performances 
may undefine FAX_DETECT.

To sum up, OLD_DSP_ROUTINES can be safely removed if no regression was 
found on new routines which AFAIK is true.
FAX_DETECT maybe removed because most users won't notice its removal 
even if there could be still a reason to have it (think of Asterisk in 
an embedded environment) but as it is not well documented I am quite 
sure "nobody" (except developers) noticed the trick to save time.



More information about the asterisk-dev mailing list