Help - Search - Members - Calendar
Full Version: compiling lame
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - Tech
LordofStars
I have the lame source from this page ftp://cedric.vabo.cz/pub/linux/apps/lame/

and the gcc compiler from this page

http://www.bloodshed.net/devcpp.html

What .c or .h file do I need to open to compile lame? What options do I need to enable? Basically What do I do to compile lame?

Thanks,
Lossy
john33
QUOTE (LordofStars @ Jan 31 2003 - 06:40 PM)
I have the lame source from this page ftp://cedric.vabo.cz/pub/linux/apps/lame/

and the gcc compiler from this page

http://www.bloodshed.net/devcpp.html

What .c or .h file do I need to open to compile lame? What options do I need to enable? Basically What do I do to compile lame?

Thanks,
Lossy

I assume that the sources relate to 3.94alpha?

I just posted a file called 'lame-compile.zip' that you can get here. This contains the version of 'nasmw.exe' that you need to do the assembly of the nasm files, and a file called 'makefile.mingw'. This makefile will work with the dev++ version of mingw32, but you will need to edit it to point to the right directories for the dev++ binaries and the lame source.

If you need more assistance on this, shout again!! biggrin.gif
LordofStars
O.K. I made the appropriate changes reflected here: www.geocities.com/janambrian/makefile.txt

I still have it renamed MakeFile.MinGW, but it doesn't compile that way... Renaming it to .cpp it attempts to compile but thinks # means preproccess instead of comment... I am so lost and probably hopeless. Help?
john33
QUOTE (LordofStars @ Jan 31 2003 - 08:06 PM)
O.K. I made the appropriate changes reflected here: www.geocities.com/janambrian/makefile.txt

I still have it renamed MakeFile.MinGW, but it doesn't compile that way... Renaming it to .cpp it attempts to compile but thinks # means preproccess instead of comment... I am so lost and probably hopeless. Help?

OK. Place the nasmw.exe file where it suits you and edit the section:

HAVE_NASM=YES
NASM = c:/nasmw098_sse2/nasmw.exe

in the makefile to point to where you placed the nasmw.exe.

Place the makefile.mingw in the root lame directory and then open a command prompt/DOS box, whatever it's called on whatever windows version you're using. Change to the root lame directory and enter:

e:\dev-cpp\bin\make makefile.mingw <CR>

then sit back and watch it compile lame.exe for you. If all went well, it should be in the root lame dir when it's finished. There will be rather a lot of '.o' and a few '.a' files around when you're done which can all be deleted.

Have fun! wink.gif
LordofStars
Perhaps I was not cut out for this....
After changes to reflect the proper nasm and source destinations were made and I dropped makefile.mingw in e:\lame I tried to run the command.
Typing e:\dev-cpp\bin\make makefile.mingw <CR>
from e:\lame resulted in a file not found typing e:\dev-cpp\bin\make e:\lame\makefile.mingw <CR>
Also resulted in a file not found. Removing the <CR> resulted in nothing can be done....

Typing e:\dev-cpp\bin\make -f e:\lame\makefile.mingw <CR>
Doesn't work.

Removing the <CR> from e:\dev-cpp\bin\make -f e:\lame\makefile.mingw <CR>
got me hopeful 'cause it started to work, but after a few moments it closed itself.

I'm going to give myself a complex trying to compile this or anything....
john33
OK, don't give up yet!! Download again from the same link and make the same changes to the makefile, then place the stuff where it was before. Open the DOS box and change to the root lame directory. then do the following:
CODE
E:\lame-3.92>copy configMS.h config.h
       1 file(s) copied.

E:\lame-3.92>c:\mingw\bin\make -f makefile.mingw


Edit: 'c:\mingw\' should be wherever your mingw dir is.

Sorry for the bum steer before! wink.gif I haven't done it this way for a while. Providing everything is point to the right places, this will work. Promise!! rolleyes.gif
Gabriel
<CR> is cariage return (ie the enter key on a keyboard)
LordofStars
Bah. It goes even farther this time but it reports a segmentation error with the 3.94a9 source and bails out after parse errors in the 3.91 source.
ViPER1313
Do you want me to make you a version of the source w/ ICL 6? Thats about as fast as it gets (I think?)
john33
QUOTE (LordofStars @ Feb 2 2003 - 02:53 AM)
Bah. It goes even farther this time but it reports a segmentation error with the 3.94a9 source and bails out after parse errors in the 3.91 source.

OK, I've just uploaded again to the same link.

This zip contains a set of instructions, 2 makefiles and 3 batch files. Follow the instructions, editing as before and you will have a lame.exe and a lame_enc.dll. I have tested this to death this morning and it works correctly. If you still have problems, there must be some other factor and you can mail me about it. wink.gif
john33
Just out of curiosity, and because I haven't made the comparison for some time, I tested the lame.exe compiled with MinGW32/GCC3.2 against my usual compile - optimised ICL6 using Dibrom's compile switches:
CODE
D:\testdir>lame --preset standard 13.wav 13.mp3
LAME version 3.94 MMX (alpha 9, Feb  2 2003 11:02:25) (http://www.mp3dev.org/)
warning: alpha versions should be used for testing only
CPU features: i387, MMX (ASM used), 3DNow! (ASM used), SIMD
Using polyphase lowpass  filter, transition band: 18671 Hz - 19205 Hz
Encoding 13.wav to 13.mp3
Encoding as 44.1 kHz VBR(q=2) j-stereo MPEG-1 Layer III (ca. 7.3x) qval=3
   Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
 8206/8208  (100%)|    0:32/    0:32|    0:32/    0:32|   6.6663x|    0:00
32 [ 151] ****
128 [1051] %*********************
160 [3202] %%%%%%%%**********************************************************
192 [2509] %%%%%%%%%%%%%%%*************************************
224 [ 658] %%%%**********
256 [ 280] %*****
320 [ 357] %%******
average: 178.7 kbps   LR: 1358 (16.54%)   MS: 6850 (83.46%)

Writing LAME Tag...done

D:\testdir>lame --preset standard 13.wav 13.mp3
LAME version 3.94 MMX (alpha 9, Feb  2 2003 00:38:17) (http://www.mp3dev.org/)
warning: alpha versions should be used for testing only
CPU features: i387, MMX (ASM used), 3DNow! (ASM used), SIMD
Using polyphase lowpass  filter, transition band: 18671 Hz - 19205 Hz
Encoding 13.wav to 13.mp3
Encoding as 44.1 kHz VBR(q=2) j-stereo MPEG-1 Layer III (ca. 7.3x) qval=3
   Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
 8206/8208  (100%)|    0:33/    0:33|    0:33/    0:33|   6.4885x|    0:00
32 [ 151] ****
128 [1054] %*********************
160 [3204] %%%%%%%%**********************************************************
192 [2509] %%%%%%%%%%%%%%%*************************************
224 [ 653] %%%%**********
256 [ 276] %*****
320 [ 361] %%******
average: 178.7 kbps   LR: 1358 (16.54%)   MS: 6850 (83.46%)

Writing LAME Tag...done

D:\testdir>


Two things to note here:

First, the comparative bit allocation is closer than I ever remember it before, almost identical, and second, the first histogram is the GCC compile, NOT the ICL compile. In other words, the GCC compile is slightly faster!! wink.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.