I'm trying to process an mp3 stream (from the microphone) in memory, without disk I/O, in a Windows Store app. I installed the NuGet package NAudio v1.8.0 but the Mp3FileReader class is not in the namespace NAudio.Wave. Should I be using some other function in this environment?
Comments: Still stuck. There seems to be no overload of MediaFoundationReader that will take as stream as an argument. (I can't afford the latency of writing to a file and then reading back again.) Here is what I tried: ``` encodingProfile = MediaEncodingProfile.CreateMp3(AudioEncodingQuality.Low); audioStream = new InMemoryRandomAccessStream(); await mediaCapture.StartRecordToStreamAsync(encodingProfile, audioStream); using (var audioStreamTest = audioStream.CloneStream()) { using (StreamReader reader = new StreamReader(audioStreamTest.AsStreamForRead())) { string textStream = await reader.ReadToEndAsync(); MediaFoundationReader mfreader = new MediaFoundationReader(textStream); } } ``` It fails, of course, because MediaFoundationReader wants to open a file with path = textStream. Would I be able to overload MediaFoundationReader to take a text stream instead of a file?
Comments: Still stuck. There seems to be no overload of MediaFoundationReader that will take as stream as an argument. (I can't afford the latency of writing to a file and then reading back again.) Here is what I tried: ``` encodingProfile = MediaEncodingProfile.CreateMp3(AudioEncodingQuality.Low); audioStream = new InMemoryRandomAccessStream(); await mediaCapture.StartRecordToStreamAsync(encodingProfile, audioStream); using (var audioStreamTest = audioStream.CloneStream()) { using (StreamReader reader = new StreamReader(audioStreamTest.AsStreamForRead())) { string textStream = await reader.ReadToEndAsync(); MediaFoundationReader mfreader = new MediaFoundationReader(textStream); } } ``` It fails, of course, because MediaFoundationReader wants to open a file with path = textStream. Would I be able to overload MediaFoundationReader to take a text stream instead of a file?