Skip to content

Conversation

facchinm
Copy link
Member

@facchinm facchinm commented Sep 2, 2024

If the gain was too high, the right bit shift
RecBuff[i] >> attenuation
would result in undefined behaviour
https://www.iso-9899.info/n1570.html#6.5.7

Take the chance to also fix the (approximate) conversion from gain (in dB) to bit shift

If the gain was too high, the right bit shift
  RecBuff[i] >> attenuation
would result in undefined behaviour
https://www.iso-9899.info/n1570.html#6.5.7

Take the chance to also fix the (approximate) conversion from gain (in dB) to bit shift
@d-le0
Copy link

d-le0 commented Sep 2, 2024

All good!
Also the behavior of setGain is intuitive.

@facchinm facchinm merged commit 92eaf0e into arduino:main Sep 2, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants