On Wednesday 28 November 2001 03:40 pm, Manoj Palki wrote:
> Hi,
>    I am trying to encode raw PCM files into mp3 using the libmp3lame
> library.
> The PCM files are sampled at 8000khz, 16bit mono.
> My rather basic questions are
>
> 1) Should I read from the PCM file into an unsigned or a signed buffer?
> 2) When I call the function 'lame_encode_buffer_int' should I input 576
> samples or 1152 samples?
>
> Thanks
> Manoj
> _______________________________________________
> mp3encoder mailing list
> [EMAIL PROTECTED]
> http://minnie.tuhs.org/mailman/listinfo/mp3encoder


http://www.evilcode.net/dklame/dk.c

I wrote this a while back when I was playing with the library.
It has a lot of limitations, only supports two-channel waves and
other misc. little things, but it's nice and simple.  It makes
use of libsndfile for the reading aspect.  Hopefully you'll
find it at least a little bit useful.

If I remember correctly there are different function in libmp3lame
for different types of input, where lame_encode_buffer[_int] takes
the type that its name implies, so, signed.  (libsndfile can return
the data read from the source pretty much any way you desire).

And I belive lame_encode_buffer_* expects 1152 samples,
someone please correct me if I'm, errr, wrong.   :)


Sam
_______________________________________________
mp3encoder mailing list
[EMAIL PROTECTED]
http://minnie.tuhs.org/mailman/listinfo/mp3encoder

Reply via email to