This project has moved and is read-only. For the latest updates, please go here.

Alternative mp3 to wav method?

May 14, 2012 at 4:45 PM
Edited May 14, 2012 at 4:45 PM


I'm currently working on a small project that operates on mp3 files at frame level, so i'm using Naudio, and i'm very happy with the results so far.

Since I'm working with a List<Mp3Frame> for direct access over individual frames, I'm wondering if it is possible to create some Mp3 reader to read directly from memory so the method definition would be:

public static void Mp3ToWav(List<Mp3Frame> array, string outputFile)

and instead of: using (Mp3FileReader reader = new Mp3FileReader(mp3File))

,I would be using:  using (Mp3Reader reader = new Mp3Reader(array))

 If this is not possible, is there any workaround i could use?

Thanks in advance,

May 25, 2012 at 10:21 AM

if you look at the NAudioDemo source code, you will see that the network streaming code decompresses MP3 frames one by one. For your purposes, I would suggest taking the MP3FileReader code, and modifying it to work with your list of Mp3Frames