This project has moved. For the latest updates, please go here.

How to integrate StreamMediaFoundationReader into a project?


I want to use the StreamMediaFoundationReader class in my application, to process the signal form the microphone in real time (i.e. without using disk I/O). I tried adding StreamMediaFoundationReader.cs to the project, but it threw a bunch of reference errors when I tried to compile. So, I looked up the required source code, added those files and tried again, and again...

So far, I have added these files to the project, with no end in sight:
Am I doing this the hard way? Can I install a library or do I just have to keep iterating as I've been doing, until there are no more reference issues?

  • Al


markheath wrote Jun 3 at 5:18 PM

Yes, the normal way to use NAudio is to reference the DLL - easiest to just use NuGet, or get the source and build yourself. The StreamMediaFoundationReader class is relatively new and is not supported on all operating systems.

Yowza wrote Jun 5 at 11:45 AM

Thank, Mark.

Yowza wrote Jun 5 at 10:47 PM

Sorry, still struggling. When I use thee NuGet package, my project build throws a missing reference error for StreamMediaFoundationReader. I have confirmed that 'StreamMediaFoundationReader.cs' is in the compile include list in 'NAudio.csproj', so I don't know what is wrong.

Do I need another 'using' statement? (I only have 'using NAudio' and 'using NAudio.Wave')