title: DirectShow.Net play video with audio
body: <p>DirectShow.Net contains sample project DxPlay which plays video without audio. I need to modify this project to make it play audio. I have read I need to add an audio filter and connect to pin but I didn't find a way to do it.</p>
  
  <p>Here is the code from the sample that sets filters up:</p>
  
  <pre><code>// Add the filters necessary to render the file.  This function will
  // work with a number of different file types.
  IBaseFilter sourceFilter = null;
  hr = m_FilterGraph.AddSourceFilter(FileName, FileName, out sourceFilter);
  DsError.ThrowExceptionForHR(hr);
  
  // Get the SampleGrabber interface
  m_sampGrabber = (ISampleGrabber)new SampleGrabber();
  IBaseFilter baseGrabFlt = (IBaseFilter)m_sampGrabber;
  
  // Configure the Sample Grabber
  ConfigureSampleGrabber(m_sampGrabber);
  
  // Add it to the filter
  hr = m_FilterGraph.AddFilter(baseGrabFlt, "Ds.NET Grabber");
  DsError.ThrowExceptionForHR(hr);
  
  // Connect the pieces together, use the default renderer
  hr = icgb2.RenderStream(null, null, sourceFilter, baseGrabFlt, null);
  DsError.ThrowExceptionForHR(hr);
  </code></pre>
  
  <p>Could you please hint me how I can make it play audio?</p>