title: Streaming audio from windows output device to linux
body: <p>I've been able to stream audio from a input device in windows to a Linux machine using LineInCode, plink (Putty) and PulseAudio but unfortunately there isn't an option to choose the Window's output device with LineInCode so I decided to make a program that it does.</p>
  
  <p>A <a href="https://github.com/mvaneerde/blog/tree/develop/loopback-capture" rel="nofollow noreferrer">program</a> developed by <a href="https://blogs.msdn.microsoft.com/matthew_van_eerde/2008/12/16/sample-wasapi-loopback-capture-record-what-you-hear/" rel="nofollow noreferrer">Matthew van Eerde</a> already do most of the work. You can select an output device and record a wav file. So instead of writing in a file I should send it to the stdout and plink and pacat would do the rest. The audio format "recorded" with his program is type WAVE_FORMAT_EXTENSIBLE (SubFormat) and it should be streamed to the pacat as a PCM. So my question is how do I convert from SubFormat to PCM audio format?</p>
  
  <p>Here's the command with linco:</p>
  
  <pre><code>linco.exe -B 16 -C 2 -R 44100 | plink -v 192.168.11.5 -l armbian -pw 1234 "cat - | pacat --playback"
  </code></pre>
  
  <p>PS: I've tried to be objective as I could, sorry for the long post. If you have an idea on how to shorten it please let me know how.</p>
  
  <p>Follows the projects link: <a href="https://github.com/rsegecin/WLStream" rel="nofollow noreferrer">https://github.com/rsegecin/WLStream</a></p>