Changes Wave stream to MP3 stream if Wave stream contains MPEG Layer 3 data.
This example shows simple using of MakeMP3 method.
string wavFile = "in.wav";
using (WaveReader wr = new WaveReader(File.OpenRead(wavFile)))
{
string mp3File = "out.mp3";
using (FileStream fs = File.Create(mp3File))
{
wr.MakeMP3(fs);
}
}
WaveReader Class | Alvas.Audio Namespace