title: how to save audio data in memory as a wav file?
body: <p>When an application calls <code>waveOutWrite(HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh)</code> on windows, I save a copy of the audio data (pointed to by pwh->lpData) sent to the Audio Card in memory.</p>
  
  <p>Now I want to save the audio data as a WAV format file on the disk, how should I do this?  </p>
  
  <p>I have the pointer to the audio data block and the size of the audo data.</p>