Generating wav

Greetings. This is the thing, I need to convert 50 voltage readings from microphone, signal is amplified, to wav format. File will then be stored on sd card and latter used for a fft analysis. By the way I am using panda II. I know that wav files have 3 part structure: rif, fmt and data. So I have the raw data part, what about the rest ? I google it and it seems to me that writing custom class would be very long and painful. Does anyone have any experience in this particular subject? What is the best way I should tackle this problem ?

This may help http://wiki.tinyclr.com/index.php?title=RLP_Realtime_Audio_Recording

Excellent, I will post my progress. Thanks.