public void mciConvertWavMP3(string fileName, bool waitFlag)
{
//maxLen is in ms (1000 = 1 second)
string outfile= "-b 32 --resample 22.05 -m m \""+pworkingDir+fileName + "\" \"" + pworkingDir+fileName.Replace(".wav",".mp3")+"\"";
System.Diagnostics.ProcessStartInfo psi=new System.Diagnostics.ProcessStartInfo();
psi.FileName="\""+pworkingDir+"lame.exe"+"\"";
psi.Arguments=outfile;
//psi.WorkingDirectory=pworkingDir;
psi.WindowStyle=System.Diagnostics.ProcessWindowStyle.Minimized;
System.Diagnostics.Process p=System.Diagnostics.Process.Start(psi);
if (waitFlag)
{
p.WaitForExit();
// wait for exit of called application
}
}
This code will help us to convert .wav file in to .mp3
...S.VinothkumaR.
Subscribe to:
Post Comments (Atom)
7 comments:
Works perfectly, thanks a lot!
Looks to me plagiarism, copied from http://www.csharphelp.com/archives/archive264.html, without any modification, extension.
Bad Bad Bad...
Hi,
I want to know that how lame.exe can be used in the provided code.
(by registering it !)
I have no idea so please tell me in detail.
Thanks
Hi vinoth,
I tried the sample above, but tis not working.
i've downloaded lame.exe, and the code runs without exception, but no output.
can you explaing in details. its an urgent work. please reply
Thanks for the post
convert mp3 to wav
Can convert from online for free. With Ringtone cutter for android you do all the above
Fantastic post. By reading this post, I have gained complete knowledge about the converter.If you want , you can easily convert mp3 to wav . just follow This blog code.
Post a Comment