unsigned short .adc_hpf(uint8_t bypass, uint8_t freeze);
unsigned short .adc_hpf(uint8_t bypass);
bypass & freeze as defined on page 34 of the SGTL5000 datasheet.
Untested, will test it personally in next couple of days but sincerely
expect it will work so committing.
Todo: Test properly. Improve comments and possibly link to wiring
example(s).
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.