title: How to capture PCM data from Wave Out
body: <p>How would it be possible to capture the audio programmatically? I am implementing an application that streams in real time the desktop on the network. The video part is finished. I need to implement the audio part. I need a way to get PCM data from the sound card to feed to my encoder (implemented using Windows Media Format). </p>
  
  <p>I think the answer is related to the openMixer(), waveInOpen() functions in Win32 API, but I am not sure exactly what should I do.</p>
  
  <p>How to open the necessary channel and how to read PCM data from it?</p>
  
  <p>Thanks in advance.</p>