I've just looked at LAME:
Download link
But there's one thing I cant figure out. There is a pascal header in there, containing the following functions:
Code:
Function beInitStream(var pbeConfig: TBE_CONFIG; var dwSample: LongWord; var dwBufferSize: LongWord; var phbeStream: THBE_STREAM ): BE_Err; cdecl; external 'Lame_enc.dll';
//Function beEncodeChunk(hbeStream: THBE_STREAM; nSamples: LongWord; pSample: PSmallInt;pOutput: PByte; var pdwOutput: LongWord): BE_Err; cdecl; external 'Lame_enc.dll';
Function beEncodeChunk(hbeStream: THBE_STREAM; nSamples: LongWord; var pSample;var pOutput; var pdwOutput: LongWord): BE_Err; cdecl; external 'Lame_enc.dll';
Function beDeinitStream(hbeStream: THBE_STREAM; var pOutput; var pdwOutput: LongWord): BE_Err; cdecl; external 'Lame_enc.dll';
Function beCloseStream(hbeStream: THBE_STREAM): BE_Err; cdecl; external 'Lame_enc.dll';
Procedure beVersion(var pbeVersion: TBE_VERSION); cdecl; external 'Lame_enc.dll';
However, there's also an include directory in the archive, containing a C++ header. I quickly scanned through it and I found out that it enables you to decode MP3 aswell. For example:
Code:
/* required call to initialize decoder */
hip_t CDECL hip_decode_init(void);
/* cleanup call to exit decoder */
int CDECL hip_decode_exit(hip_t gfp);
int CDECL hip_decode( hip_t gfp
, unsigned char * mp3buf
, size_t len
, short pcm_l[]
, short pcm_r[]
);
/* same as hip_decode, and also returns mp3 header data */
int CDECL hip_decode_headers( hip_t gfp
, unsigned char* mp3buf
, size_t len
, short pcm_l[]
, short pcm_r[]
, mp3data_struct* mp3data
);
Just wondering why the pascal header doesn't have these defs. Is there any translation somewhere?
Thanks
Bookmarks