title: How to access an audio stream using DirectShow.NET C#
body: <p>What I would like to do is to pass an arbitrary audio file to a DirectShow filtergraph and receive a (PCM audio) stream object in the end using .NET 3.5 C# and DirectShow.NET. I would like to reach the point that I can just say:</p>
  
  <pre><code> Stream OpenFile(string filename) {...}
  </code></pre>
  
  <p>and</p>
  
  <pre><code>stream.Read(...)
  </code></pre>
  
  <p>I have been reading up on DirectShow for a couple of days and think I have started to grasp the idea of filters and filtergraphs. I found examples (<a href="http://www.informikon.com/directshow-tutorials/yet-another-capture-sample-in-c.html" rel="nofollow noreferrer">to file</a> / <a href="http://replay.waybackmachine.org/20091021154718/http://geocities.com/contactgirish/DirectShow.html" rel="nofollow noreferrer">to device</a>) how to play audio or write it to a file, but cannot seem to find the solution for a Stream object. Is this even possible? Could you point me in the right direction in case I missed something, please?</p>
  
  <p>Best,</p>
  
  <p>Hauke</p>