Have got strange result of using MediaFoundationReader to extract audio on Windows 7 64-bit.
Actually, I use MediaFoundationReader for extracting WAVE data to temp file like this:
```
using (var reader = new MediaFoundationReader(sourceFilename))
{
WaveFileWriter.CreateWaveFile(copyFilename, reader);
}
```
After that I read WAVE data with WaveFileReader:
```
using (var sourceFileReader = new WaveFileReader(sourceFilename))
{
Console.WriteLine("Length:\t\t{0}", sourceFileReader.Length);
}
using (var copyFileReader = new WaveFileReader(copyFilename))
{
Console.WriteLine("Length of copy:\t{0}", copyFileReader.Length);
}
```
On Windows 8.1 I get the same data lengths, but on Windows 7 copy has end-trimmed data.
Is there bug in NAudio or Media Foundation on Windows 7?
Test project in attachment.
![Image](http://auxmic.com/sites/default/files/pictures/naudio_test_win7_x64.png)
![Image](http://auxmic.com/sites/default/files/pictures/naudio_test_win8.1_x64.png)
Actually, I use MediaFoundationReader for extracting WAVE data to temp file like this:
```
using (var reader = new MediaFoundationReader(sourceFilename))
{
WaveFileWriter.CreateWaveFile(copyFilename, reader);
}
```
After that I read WAVE data with WaveFileReader:
```
using (var sourceFileReader = new WaveFileReader(sourceFilename))
{
Console.WriteLine("Length:\t\t{0}", sourceFileReader.Length);
}
using (var copyFileReader = new WaveFileReader(copyFilename))
{
Console.WriteLine("Length of copy:\t{0}", copyFileReader.Length);
}
```
On Windows 8.1 I get the same data lengths, but on Windows 7 copy has end-trimmed data.
Is there bug in NAudio or Media Foundation on Windows 7?
Test project in attachment.
![Image](http://auxmic.com/sites/default/files/pictures/naudio_test_win7_x64.png)
![Image](http://auxmic.com/sites/default/files/pictures/naudio_test_win8.1_x64.png)