In the uncompressed situation I know I need to read the wav header, pull out the number of channels, bits, and sample rate and work it out from there:
(channels) * (bits) *
You might find that the XNA library has some support for working with WAV's etc. if you are willing to go down that route. It is designed to work with C# for game programming, so might just take care of what you need.