While trying to find why assigning more than one set of coefficients for
AudioFilterBiquad results in no output I discovered my check for flag
before updating other than 1st set of coefficients was flawed so I fixed
it.
I also modified the way 'data' is assigned so the assignment only occurs
once per set of coefficients, possibly not the most efficient but I like
it better than my previous method.
These changes don't appear to effect the use of AudioFilterBiquad for a
single set of coefficients and, unfortunately, it doesn't make it start
working either - implementation of a second (or more than one) set of
coefficients still results in output being silenced but the update to
updateCoefs(..) is necessary so I am committing it.
deadly simplistic peak difference measuring object, after begin() just
goes through samples and find the maximum and minimum signed values,
natural behavior of begin() is to reset the max and min, member uint16_t
Dpp() returns maximum difference seen and .stop() does what it says.
'data' needs to be reset inside the 'flag' controlled loop or
*undefined* behavior is likely when user sets 'flag' and loop repeats
without resetting 'data' to beginning of block.
Added
AudioControlSGTL5000::dap_avc(..);
AudioControlSGTL5000::dap_avc_enable(..);
SGTL5000_Specific/dap_avc_agc example sketch
Also added 'public domain...' line to all my examples.
The 'tone' filter examples are both using calcBiquad(..); but one uses
AudioFilterBiquad and other uses SGTL5000 PEQ filters. Had included code
for volume level control optionally and decided to drop it from both.
I forgot to sync the changes relating to things like 'dac_vol_right(..)'
& 'dac_vol_left(..)' removed in favor of 'dac_vol(left,right)' instead;
applies to 'volume(..)', 'lo_lvl(..)' & 'dac_vol(..)'.