title: How to get exact length of wave data with MediaFoundationReader?
body: <p>While reading a WAVE file as binary data, I get the length of 'data' chunk from corresponding bytes (<a href="https://ccrma.stanford.edu/courses/422/projects/WaveFormat/" rel="nofollow">Subchunk2Size</a>).</p>
  
  <p>But when I use NAudio MediaFoundationReader I get sligtly different data size value, because it's <em>calculated</em> as:</p>
  
  <pre><code>    private long GetLength(IMFSourceReader reader)
      {
          ...
          var lengthInBytes = (((long)variant.Value) * waveFormat.AverageBytesPerSecond) / 10000000L;
          ...
          return lengthInBytes;
      }
  </code></pre>
  
  <p>Is there a way to get exact data length witn NAudio MediaFoundationReader?</p>