RSS Forums RSS
Please support our C++ advertiser: Programming Forums

Compression/Decompression Wave File to MP3 and Vice Versa

Join Date: Jun 2005
Location: Tokyo, Japan
Posts: 1,481
Reputation: WolfPack has a spectacular aura about WolfPack has a spectacular aura about WolfPack has a spectacular aura about 
Rep Power: 8
Solved Threads: 102
Moderator
WolfPack's Avatar
WolfPack WolfPack is offline Offline
Mentally Challenged Mod.

Re: Compression/Decompression Wave File to MP3 and Vice Versa

  #10  
Apr 25th, 2006
Okay since you are using lame, I will tell you how to use it.
The syntax for using lame.exe is
lame [options] inputfile [outputfile]
So say for example you want to convert the exampleinput.wav to exampleoutput.mp3.

What you have to do is this.
add the line
system( "lame.exe exampleinput.wav exampleoutput.mp3" );
into your program and compile.

put lame.exe and exampleinput.wav to the folder where you have put your program, and run your program. You should find the exampleoutput.mp3 file created inside that folder.

here is a minimal example.
int main()
{
       system( "lame.exe exampleinput.wav exampleoutput.mp3" );
return 0;
}
Compile the above program and put the lame.exe and exampleinput.wav file to the same folder where your program is. Then run it. You should see the results.
For more information refer the usage.txt file that came with the dll file. I have attached it in this post too.
Attached Files
File Type: txt usage.txt (30.2 KB, 9 views)
バルサミコ酢やっぱいらへんで
Reply With Quote  
All times are GMT -4. The time now is 12:10 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC