I am using the MAD low-level interface. I need to implement a volume control where the attenuation is specified in dB. Can anyone suggest a suitable algorithm, or better still tell me where I can find example code that does this? Thank you.