How to encode to mp3 after saving a wav file

May 19, 2015 at 2:29 PM
I was wondering if it is possible to encode to mp3 after recording a wav file. I tried to change the WasapiCapture parameters but I think that is not working since the sound length has only 5 seconds and 1,20 MB.

Here the sample code trying to converting to mp3 before start the recording:
 _soundIn = new WasapiCapture(false, AudioClientShareMode.Shared, 100,
                    new WaveFormat(44100, 32, 2, AudioEncoding.MpegLayer3));
Thank you guys!
Coordinator
May 19, 2015 at 7:58 PM
May 20, 2015 at 11:22 AM
Edited May 20, 2015 at 11:22 AM
Thank you for the reply.

I tried to use mp3 using the example above. But I always got this error: No MP3-Encoder was found. Do you have any idea how can I solve this?

I tried to run it on Windows 7, and recording direct from Microphone. I can create a "wav" file normally though. The problem is because the file is become too large like 30 seconds spends 6 MB.
Coordinator
May 27, 2015 at 8:38 PM
Marked as answer by filoe on 5/27/2015 at 1:38 PM