> From: Kali Griffin <[EMAIL PROTECTED]>
> 
> I am trying to figure out where in the code the mp3 data is outputted
> frame by frame so that I can add an extra header to the frames so that
> lame can interface with windows media player.  
> 
windows media player really wont accept a standard mp3 file???


> i looked in empty_buffer and I figured that at the fwrites: tmpbuf was one
> frame of mp3 data being outputed.  however, then I saw this structure:
> 
> 
> #if  BS_FORMAT == BINARY 
> //output routine that outputs tmpbuf which is of 
>   variable size: buf_size-minimum
> 
> 
> #else
> //output routine that outputs val[2], 2 chars at a time
> 

That is the right place, but it looks like an old version.  The code
in the #else is never used and has been deleted.  

In the ISO code and older versions of lame, empty_buffer is only
called if the buffer is full.  So tmpbuf will always contain
several frames.  In newer versions, LAME was modified to 
call empty_buffer() after encoding every frame, and
lame_encode() will return a copy of tmpbuf after encoding
every frame.  But sometimes this will be empty, and on rare
occasions it can have more than one mp3 frame.  

Mark
   
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

Reply via email to