[asterisk-dev] [Code Review] dsp.c ast_dsp_call_progress use local short variable in loop, plus other cleanup

Alec Davis reviewboard at asterisk.org
Thu Sep 20 06:08:33 CDT 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2107/
-----------------------------------------------------------

(Updated Sept. 20, 2012, 6:08 a.m.)


Review request for Asterisk Developers.


Changes
-------

This is for trunk only.

removed white space changes.


Summary (updated)
-------

janitor cleanup. No functional change.

1). ast_dsp_call_progress: use 'short samp' instead of s[x] inside loop.
    apply same casting as other _init, dsp->energy = (int32_t) samp * (int32_t) samp

2). ast_dtmf_detect_init: move repeated setting of s->energy to outside of loop.
    do goertzel_init loop first before setting s->lasthit and s->current_hit, consistant with ast_dsp_digitreset()

3). ast_mf_detect_init:
    do goertzel_init loop first before setting s->hits[] and s->current_hit, consistant with ast_dsp_digitreset()

4). Don't chain init different variables, as the type may change


Diffs (updated)
-----

  trunk/main/dsp.c 373202 

Diff: https://reviewboard.asterisk.org/r/2107/diff


Testing
-------

compiles.


Thanks,

Alec

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120920/c9f2ce63/attachment.htm>


More information about the asterisk-dev mailing list