title: How to convert PCM to MP3?
body: <p>I am in the process of converting PCM to MP3 player. It does not work well to convert PCM files with 20KHz to MP3. What's the problem?</p>
  
  <p><a href="https://i.stack.imgur.com/EMudx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EMudx.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/ODTrq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ODTrq.png" alt="enter image description here"></a></p>
  
  <p>And this is my code:</p>
  
  <pre><code>using (var retMs = new MemoryStream())
          using (var ms = new MemoryStream(File.ReadAllBytes(filename)))
          using (var rdr = new WaveFileReader(ms))
          using (var wtr = new LameMP3FileWriter(retMs, rdr.WaveFormat, 128))
          {
              rdr.CopyTo(wtr);
              File.WriteAllBytes(Environment.CurrentDirectory + @"\Mix.mp3", retMs.ToArray());
          }
  </code></pre>