Hello

We do have the problem to encode a ripped .wav file into a .mp3 file.
Ok, seems to be no problem, but we just want a 30sec piece of the
audiofile
and this after the first minute. (encode 1:01 to 1:31)

A solution would be a wave-editor, but it should be running in a batch,
no interactive program. I grabed the lame source, open main.c and :

int makeframe(void)
{
  int iread;
  static short int Buffer[2][1152];
  iread=lame_readframe(Buffer);
  /* even if iread=0, get_audio hit EOF and returned Buffer=all 0's. 
call
   * makeframe() one last time to flush all buffers */
  lame_encode(Buffer,mp3buffer);
  return iread;
}          

So, its seems to be that easy, just count a few lame_readframe 
without invoking lame_encode, ...

Ok, searched a bit and what is done is  reading PCM-frames.
They use 2x1152 bytes, 

        BUT:  how long is a PCM-Frame in seconds?

Answers are welcome, and thanx in advance
 
Hubertus Krogmann       PaderLinx Neue Informationsmedien GmbH
Email: [EMAIL PROTECTED]
Tel.: 05251-8994-18  Fax: 05251-8994-20  WWW: www.paderlinx.de

S/MIME Cryptographic Signature

Reply via email to