I am trying to convert wav file into mp3 using following code.
using (var wavRdr = new WaveFileReader(item))
using (var mp3Writer = new LameMP3FileWriter(outputPath.Replace(".wav", ".mp3"), wavRdr.WaveFormat, _bitRate, tag))
{
wavRdr.CopyTo(mp3Writer);
}
LameMP3FileWriter does not have any parameter to set Channels and Sample Rate for MP3 format.
After some research, i have got an idea that i have to set the channel and sample rate before calling the conversion method but i do not know how to do this.
I used this for conversion which i have done successfully but now i need to set channels and sample rate for mp3 file. Please help!