That helps but the problem is I give it 196608 bytes of the mp3 file and it 
still returns 0.

I dont know whats not working ...

Thanks
-Mat

On Sunday 12 May 2002 13:19, you wrote:
> > Hi,
> >     I dont know if this is the right mailing list for such a question the
> > mailing list link on the lame homepage links to a file so I dont know...
> >     Im using the lame interface to decode mp3s. But whenever I call
> > lame_decode it returns 0, meaning according to the header file that it
> > needs more data, Im wondering how much data I should give it ?? What is
> > an ideal size for the mp3buffer?
> >     And while we're at it could someone tell me what the len param is for?
> > The size of the pcm buffer or the size of the mp3 buffer?
> >
> > Thanks
> > -Mat
> > --
> > Mathieu Dube -- [EMAIL PROTECTED]
> > 8D Technologies Inc.
> > http://www.8d.com
>
> Hi Mat,
>
> I'm not sure what the optimal size is, but I would guess the larger
> the better.  The lame frontend decoder (which is far from optimal)
> feeds the decoder a few bytes at a time until the header is parsed,
> and after that calls lame_decode with 1K bytes of data.
>
> I see the documentation in lame.h for 'lame_decode_*()' functions is
> pretty sparse.  I added this, which should answer your questions:
>
>
> /*********************************************************************
>  * input 1 mp3 frame, output (maybe) pcm data.
>  *
>  *  nout = lame_decode(mp3buf,len,pcm_l,pcm_r);
>  *
>  * input:
>  *    len          :  number of bytes of mp3 data in mp3buf
>  *    mp3buf[len]  :  mp3 data to be decoded
>  *
>  * output:
>  *    nout:  -1    : decoding error
>  *            0    : need more data before we can complete the decode
>  *           >0    : returned 'nout' samples worth of data in pcm_l,pcm_r
>  *    pcm_l[nout]  : left channel data
>  *    pcm_r[nout]  : right channel data
>  *
>  *********************************************************************/
>
>
>
> _______________________________________________
> mp3encoder mailing list
> [EMAIL PROTECTED]
> http://minnie.tuhs.org/mailman/listinfo/mp3encoder

-- 
Mathieu Dube -- [EMAIL PROTECTED]
8D Technologies Inc.
http://www.8d.com
_______________________________________________
mp3encoder mailing list
[EMAIL PROTECTED]
http://minnie.tuhs.org/mailman/listinfo/mp3encoder

Reply via email to