This project has moved. For the latest updates, please go here.

NAudio File Conversion

Feb 21, 2015 at 2:06 PM
I have Mp3 audio files with the same music, which are encoded at different sample rate and bit depth.

For example:
  • Titanic - 96 Kbps - 44 KHz.mp3
  • Titanic - 96 Kbps - 48 KHz.mp3
  • Titanic - 128 Kbps - 44 KHz.mp3
  • Titanic - 128 Kbps - 48 KHz.mp3
  • Titanic - 192 Kbps - 44 KHz.mp3
  • Titanic - 192 Kbps - 48 KHz.mp3
  • Titanic - 224 Kbps - 44 KHz.mp3
  • Titanic - 224 Kbps - 48 KHz.mp3
  • Titanic - 320 Kbps - 44 KHz.mp3
  • Titanic - 320 Kbps - 48 KHz.mp3
I want to convert all these Mp3 files to Wav format (PCM IEEE float format) using NAudio.

Before converting to Wav format, I want to ensure that all Mp3 files must be converted to a standard sample rate and bit depth: 192 Kbps, 48 KHz.

Do I need to do re-sampling of Mp3 to the required Mp3 rate before finally converting it to Wav format? Or can it be done when converting to Wav format?

Appreciate if you can provide an example code.

Thanks.