当前位置:编程学习 > C#/ASP.NET >>

求问C#怎么调用lame_enc.dll把wav转码成mp3?

自己看不太懂,这是dll的说明http://wenku.baidu.com/view/a5f81e4769eae009581becf0.html。使用lame.exe的话就是lame.exe -b 128 aa.wav bb.mp3.
lame下载地址
http://www4.skycn.com/soft/7195.html --------------------编程问答-------------------- string lameEXE = @"C:\path_of_lame\lame.exe";
string lameArgs = "-b 128";

string wavFile = @"C:\my_wavs\input.wav";
string mp3File = @"C:\my_mp3s\output.mp3";

Process process = new Process();
process.StartInfo = new ProcessStartInfo();
process.StartInfo.FileName = lameEXE;
process.StartInfo.Arguments = string.Format(
    "{0} {1} {2}",
    lameArgs,
    wavFile,
    mp3File);

process.Start();
process.WaitForExit();

int exitCode = process.ExitCode;
  
*****************************************************************************
签名档: http://feiyun0112.cnblogs.com/ --------------------编程问答--------------------
引用 1 楼 feiyun0112 的回复:
string lameEXE = @"C:\path_of_lame\lame.exe";
string lameArgs = "-b 128";

string wavFile = @"C:\my_wavs\input.wav";
string mp3File = @"C:\my_mp3s\output.mp3";

Process process = new Process();
process.StartInfo = new ProcessStartInfo();
process.StartInfo.FileName = lameEXE;
process.StartInfo.Arguments = string.Format(
    "{0} {1} {2}",
    lameArgs,
    wavFile,
    mp3File);

process.Start();
process.WaitForExit();

int exitCode = process.ExitCode;
  
*****************************************************************************
签名档: http://feiyun0112.cnblogs.com/

呃,我需要用lame_enc.dll不是lame.exe --------------------编程问答-------------------- http://www.codeproject.com/Articles/5901/C-MP3-Compressor
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,