LAME by default do not support floating point input, but it is possible with libmp3lame
lame+libsndfile accept input, but generate silence mp3 (this build by john@rarewares)
projects with libmp3lame, wich accept float, but I dont know what format they feed to library (float or int) :
ffmpeg
sox
sox web cvs /sox/sox/src/mp3.c
CODE
/* NOTE: This logic assumes that "short int" is 16-bits
* on all platforms. It happens to be for all that I know
* about.
*
* Lame ultimately wants data scaled to 16-bit samples
* and assumes for the majority of cases that your passing
* in something scaled based on passed in datatype
* (16, 32, 64, and float).
*
* If we used long buffers then this means it expects
* different scalling between 32-bit and 64-bit CPU's.
*
* We might as well scale it ourselfs to 16-bit to allow
* lsx_malloc()'ing a smaller buffer and call a consistent
* interface.
*/
* on all platforms. It happens to be for all that I know
* about.
*
* Lame ultimately wants data scaled to 16-bit samples
* and assumes for the majority of cases that your passing
* in something scaled based on passed in datatype
* (16, 32, 64, and float).
*
* If we used long buffers then this means it expects
* different scalling between 32-bit and 64-bit CPU's.
*
* We might as well scale it ourselfs to 16-bit to allow
* lsx_malloc()'ing a smaller buffer and call a consistent
* interface.
*/
does that mean it is using 16 bit internally? can someone who understand read part of code?
ffmpeg-0.5.tar.bz2 /ffmpeg/libavcodec/libmp3lame.c
I dont know where to look, but this file is very old (2002) and almost everything in source is int
