Precise volume control

Nige <[email protected]> Fri, 14 Aug 2009 21:53:23 +0100
Newsgroups gmane.comp.audio.mad.devel
Message-ID <[email protected]>
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.