|
Packit |
47f805 |
<html>
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
<head>
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
content="text/html; charset=iso-8859-1">
|
|
Packit |
47f805 |
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
|
Packit |
47f805 |
<title>Lame-</title>
|
|
Packit |
47f805 |
</head>
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
<body bgcolor="#FFFFFF">
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
<font size="7">Lame-enc DLL</font>
|
|
Packit |
47f805 |
<font size="5">Interface version 1.32</font> (and above)
|
|
Packit |
47f805 |
(Lame engine version: 3.93 or higher)
|
|
Packit |
47f805 |
<font size="6">Programmers Manual</font>
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
The lame_enc.dll and this manual is
|
|
Packit |
47f805 |
copyright by Albert L Faber
|
|
Packit |
47f805 |
Originally the the DLL interface is modeled after the BladeEnc
|
|
Packit |
47f805 |
DLL interface
|
|
Packit |
47f805 |
which is copyrighted by Tord Jansson and Jukka Poikolainen
|
|
Packit |
47f805 |
This document and the DLL interface may be distributed freely
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
as long as modifications are released under the LGPL license.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
Homepage:
|
|
Packit |
47f805 |
href="http://www.cdex.n3.net">http://www.cdex.n3.net
|
|
Packit |
47f805 |
E-mail: mailto:
|
|
Packit |
47f805 |
href="mailto:afaber@users.sourceforge.net">afaber@users.sourceforge.net
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
<font size="5">Distribution</font>
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
People and companies who wants to distribute
|
|
Packit |
47f805 |
lame_enc.dll with their commercial products are free to do so as
|
|
Packit |
47f805 |
far as I'm concerned (LGPL license), but should be aware that
|
|
Packit |
47f805 |
lame_enc.dll might infringe certain MP3 related software patents
|
|
Packit |
47f805 |
held by Fraunhofer IIS in certain countries.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
<font size="5">Disclaimer</font>
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
lame_enc.dll and this manual is distributed 'as is' with no
|
|
Packit |
47f805 |
warranty of any kind. The Author is not to be held responsible
|
|
Packit |
47f805 |
for the result of any use or misuse of this product.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
<font size="5">Current Bugs and Limitations</font>
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
Although the interface is designed to be able to handle
|
|
Packit |
47f805 |
multiple parallel streams it can't be done yet due to limitations
|
|
Packit |
47f805 |
in the engine, only one stream is allowed.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
<font size="5">Future Compatibility</font>
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
This interface should be compatible with all future versions
|
|
Packit |
47f805 |
of lame_enc.DLL without any need to recompile your programs. You
|
|
Packit |
47f805 |
should therefore not check the version number upon start
|
|
Packit |
47f805 |
and prevent users from running your program with a later version
|
|
Packit |
47f805 |
of lame_enc.DLL.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
<font size="5">How to use the DLL</font>
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
1. Fill in a BE_CONFIG structure
|
|
Packit |
47f805 |
and send it to beInitStream(). Make
|
|
Packit |
47f805 |
sure that BE_ERR_SUCCESSFUL is returned.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
2. Reserve at least the amount of memory returned in
|
|
Packit |
47f805 |
dwBufferSize as your output buffer.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
3. Call beEncodeChunk() until
|
|
Packit |
47f805 |
you've encoded everything you want.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
4. Call beDeinitStream() to
|
|
Packit |
47f805 |
make sure that all encoded data is flushed out before closing the
|
|
Packit |
47f805 |
stream.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
5. Close the stream using beCloseStream()
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
6. Finally, call the beWriteVBRHeader()
|
|
Packit |
47f805 |
functions, to insert the INFO tag MP3 Header. This is an
|
|
Packit |
47f805 |
extension of the Xing VBR tag which is also used for CBR
|
|
Packit |
47f805 |
encodings. This call can only be omitted if the INFO tag was
|
|
Packit |
47f805 |
explicilty disabled in the BE_CONFIG Structure.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
A handy feature is the available
|
|
Packit |
47f805 |
href="#Lame_enc.dll debug option">Lame_enc.dll debug option,
|
|
Packit |
47f805 |
which will dump the important lame internal settings to a text
|
|
Packit |
47f805 |
file.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
<font size="5">Return Values</font>
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
See the header-file for a complete list of function return
|
|
Packit |
47f805 |
values. All functions should return BE_ERR_SUCCESSFUL unless
|
|
Packit |
47f805 |
something went wrong.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
The DLL is by default compiled with the MS Visual C/C++
|
|
Packit |
47f805 |
compiler, which has the following type definitions:
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
Type
|
|
Packit |
47f805 |
Description
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
CHAR
|
|
Packit |
47f805 |
signed char (8 bits)
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
BYTE
|
|
Packit |
47f805 |
unsigned char (8 bits)
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
SHORT
|
|
Packit |
47f805 |
signed short (16 bits)
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
WORD
|
|
Packit |
47f805 |
unsigned short (16 bits)
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
INT
|
|
Packit |
47f805 |
signed long (32 bits)
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
LONG
|
|
Packit |
47f805 |
signed long (32 bits)
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
BOOL
|
|
Packit |
47f805 |
signed long (32 bits) (YES, 32 bits for a one bit
|
|
Packit |
47f805 |
value)
|
|
Packit |
47f805 |
TRUE = 0
|
|
Packit |
47f805 |
FALSE=-1
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
DWORD
|
|
Packit |
47f805 |
unsigned long (32 bits)
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
FLOAT
|
|
Packit |
47f805 |
floating point (32 bits)
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
DOUBLE
|
|
Packit |
47f805 |
float point (64 bits)
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
LPCSTR
|
|
Packit |
47f805 |
const char* (32 bits pointer to zero terminated
|
|
Packit |
47f805 |
character string)
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
Within the lame_enc.dll All the structure elements are one
|
|
Packit |
47f805 |
byte alligned (due to backwards compatibility with BladEnc.DLL!
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
BE_CONFIG Structure </font>
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
<font size="3">Currently there the BE_CONFIG structure has to
|
|
Packit |
47f805 |
varians, the old MP3 config structure that is truly compatible
|
|
Packit |
47f805 |
with the old BladeEnc interface, and the new defined LHV1
|
|
Packit |
47f805 |
structure, which can set far more options in the lame encoder</font>
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
<font size="5">The MP3 BE_CONFIG - structure (OBSOLETE)</font>
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
This is the old structure as it was originally defined by the
|
|
Packit |
47f805 |
BladeEnc.DLL interface. However, I do highly recommend to use the
|
|
Packit |
47f805 |
new Lame specific config structure, since it gives you more
|
|
Packit |
47f805 |
control over the Lame encoder settings.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
These are the members of the BE_CONFIG structure you need to
|
|
Packit |
47f805 |
fill in before you call beInitStream():
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
dwConfig
|
|
Packit |
47f805 |
Specifies what kind of output you want. Since only
|
|
Packit |
47f805 |
MP3 currently is supported you must set this to BE_CONFIG_MP3
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.mp3.dwSampleRate
|
|
Packit |
47f805 |
Samplerate in Hz for MP3 file. This can be set to
|
|
Packit |
47f805 |
either 32000, 44100 or 48000.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.mp3.byMode
|
|
Packit |
47f805 |
Stereomode for MP3 file. This can be either BE_MP3_MODE_STEREO,
|
|
Packit |
47f805 |
BE_MP3_MODE_DUALCHANNEL or BE_MP3_MODE_MONO.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.mp3.bitrate
|
|
Packit |
47f805 |
Bitrate (i.e. size) of MP3 file in kBit/s. Allowed
|
|
Packit |
47f805 |
bitrates are: 32, 40, 48, 56, 64, 80, 96, 112, 128,
|
|
Packit |
47f805 |
160, 192, 224, 256 and 320.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.mp3.bCopyright
|
|
Packit |
47f805 |
If this is set to TRUE the Copyright bit in the MP3
|
|
Packit |
47f805 |
stream will be set.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.mp3.bCRC
|
|
Packit |
47f805 |
Set this to TRUE in order to enable CRC-checksum in
|
|
Packit |
47f805 |
the bitstream.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.mp3.bOriginal
|
|
Packit |
47f805 |
If this is set to TRUE the Original bit in the MP3
|
|
Packit |
47f805 |
stream will be set.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.mp3.bPrivate
|
|
Packit |
47f805 |
If this is set to TRUE the Private bit in the MP3
|
|
Packit |
47f805 |
stream will be set.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
<font size="5">The LHV1 BE_CONFIG - structure (recommended)</font>
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
These are the members of the LHV1 BE_CONFIG structure, you
|
|
Packit |
47f805 |
need to fill in before you call beInitStream():
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
dwConfig
|
|
Packit |
47f805 |
Specifies what kind of output you want. Since only
|
|
Packit |
47f805 |
MP3 currently is supported you must set this to BE_CONFIG_LAME
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.LHV1.dwStructVersion
|
|
Packit |
47f805 |
Indicates the version number of the structure,
|
|
Packit |
47f805 |
current version number is 1
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.LHV1.dwStructSize
|
|
Packit |
47f805 |
Specifies the size of the BE_CONFIG structure
|
|
Packit |
47f805 |
(currently 331 bytes)
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.LHV1.dwSampleRate
|
|
Packit |
47f805 |
Samplerate in Hz for MP3 file. This can be set to
|
|
Packit |
47f805 |
either:
|
|
Packit |
47f805 |
32000, 44100 or 48000 for MPEG-I
|
|
Packit |
47f805 |
16000, 22050 or 24000 for MPEG-I
|
|
Packit |
47f805 |
8000, 11025 or 12000 for MPEG-II.5
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.LHV1.dwReSampleRate
|
|
Packit |
47f805 |
Specifies to which sample rate the input stream has
|
|
Packit |
47f805 |
to be resampled, if set to 0, the encoder will decide
|
|
Packit |
47f805 |
which ReSample rate to use
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.LHV1.nMode
|
|
Packit |
47f805 |
Stereomode for MP3 file. This can be either BE_MP3_MODE_STEREO,
|
|
Packit |
47f805 |
BE_MP3_MODE_JSTEREO, BE_MP3_MODE_DUALCHANNEL or BE_MP3_MODE_MONO.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.LHV1.dwBitrate
|
|
Packit |
47f805 |
For CBR, this specifies the actual bitrate, for VBR,
|
|
Packit |
47f805 |
it specifies the minimum bitrate
|
|
Packit |
47f805 |
Allowed bitrates are: 32, 40, 48, 56, 64, 80, 96, 112,
|
|
Packit |
47f805 |
128, 160, 192, 224, 256 and 320.for MPEG-I
|
|
Packit |
47f805 |
Allowed bitrates are: 8, 16, 24, 32, 40, 48, 56, 64,
|
|
Packit |
47f805 |
80, 96, 112, 128, 144 and 160.for MPEG-IINote:
|
|
Packit |
47f805 |
dwBitrate is used as the minimum bitrate in the case of
|
|
Packit |
47f805 |
using a VBR mode.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.LHV1.dwMaxBitrate
|
|
Packit |
47f805 |
When VBR mode is enabled, it specifies the maximum
|
|
Packit |
47f805 |
allowed bitrate (see also dwBitrate to specify the minium
|
|
Packit |
47f805 |
bitrate), for CBR mode this setting is ignored.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.LHV1.nPreset
|
|
Packit |
47f805 |
Keep in mind that the presets can overwrite some of
|
|
Packit |
47f805 |
the other settings, since it is called right before the
|
|
Packit |
47f805 |
encoder is initialized
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
The nPreset option can be set to one of the
|
|
Packit |
47f805 |
following presets values::
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
LQP_NOPRESET (don't use any presets)
|
|
Packit |
47f805 |
LQP_NORMAL_QUALITY (quality is set to 5)
|
|
Packit |
47f805 |
LQP_LOW_QUALITY (quality is set to 9)
|
|
Packit |
47f805 |
LQP_HIGH_QUALITY (quality is set to 2)
|
|
Packit |
47f805 |
LQP_VOICE_QUALITY (use for voice encoding)
|
|
Packit |
47f805 |
LQP_R3MIX (r3mix preset option)
|
|
Packit |
47f805 |
LQP_VERYHIGH_QUALITY (quality is set to 0)
|
|
Packit |
47f805 |
LQP_STANDARD (lame command line alt-preset standard)
|
|
Packit |
47f805 |
LQP_FAST_STANDARD (lame command line alt-preset fast
|
|
Packit |
47f805 |
standard)
|
|
Packit |
47f805 |
LQP_EXTREME (lame command line alt-preset extreme)
|
|
Packit |
47f805 |
LQP_FAST_EXTREME (lame command line alt-preset fast
|
|
Packit |
47f805 |
extreme)
|
|
Packit |
47f805 |
LQP_INSANE (lame command line alt-preset insane)
|
|
Packit |
47f805 |
LQP_ABR (lame command line alt-preset abr)
|
|
Packit |
47f805 |
LQP_CBR(lame command line alt-preset cbr)
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
(old lame preset options)
|
|
Packit |
47f805 |
LQP_PHONE
|
|
Packit |
47f805 |
LQP_SW
|
|
Packit |
47f805 |
LQP_AM
|
|
Packit |
47f805 |
LQP_FM
|
|
Packit |
47f805 |
LQP_VOICE
|
|
Packit |
47f805 |
LQP_RADIO
|
|
Packit |
47f805 |
LQP_TAPE
|
|
Packit |
47f805 |
LQP_HIFI
|
|
Packit |
47f805 |
LQP_CD
|
|
Packit |
47f805 |
LQP_STUDIO
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.LHV1.bCopyright
|
|
Packit |
47f805 |
If this is set to TRUE the Copyright bit in the MP3
|
|
Packit |
47f805 |
stream will be set.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.LHV1.bCRC
|
|
Packit |
47f805 |
Set this to TRUE in order to enable CRC-checksum in
|
|
Packit |
47f805 |
the bitstream.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.LHV1.bOriginal
|
|
Packit |
47f805 |
If this is set to TRUE the Original bit in the MP3
|
|
Packit |
47f805 |
stream will be set.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.LHV1.bPrivate
|
|
Packit |
47f805 |
If this is set to TRUE the Private bit in the MP3
|
|
Packit |
47f805 |
stream will be set.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.LHV1.nVbrMethod
|
|
Packit |
47f805 |
Sepecifes if the VBR method to use, currently the
|
|
Packit |
47f805 |
following settings are supported:<font size="3">VBR_METHOD_NONE
|
|
Packit |
47f805 |
(don't use VBR, use CBR encoding instead),
|
|
Packit |
47f805 |
VBR_METHOD_DEFAULT (default VBR method)
|
|
Packit |
47f805 |
VBR_METHOD_OLD (old VBR method, proven to be reliable)
|
|
Packit |
47f805 |
VBR_METHOD_NEW (new VBR method, faster than
|
|
Packit |
47f805 |
VBR_METHOD_OLD)
|
|
Packit |
47f805 |
VBR_METHOD_MTRH (depreciated, same as VBR_METHOD_NEW)
|
|
Packit |
47f805 |
VBR_METHOD_ABR (Average Bitrate Encoding, see also </font>format.LHV1.dwVbrAbr_bps
|
|
Packit |
47f805 |
size="3">)</font>
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.LHV1.bWriteVBRHeader
|
|
Packit |
47f805 |
Sepecifes if the a XING VBR header should be written
|
|
Packit |
47f805 |
or not. When this option is enabled, you have to call the
|
|
Packit |
47f805 |
<font size="3">beWriteVBRHeader function when encoding
|
|
Packit |
47f805 |
has been completed. Keep in mind that the VBR info tag
|
|
Packit |
47f805 |
can also be written for CBR encoded files, the TAG info
|
|
Packit |
47f805 |
can be useful for additional info like encoder delay and
|
|
Packit |
47f805 |
the like.</font>
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.LHV1.bEnableVBR
|
|
Packit |
47f805 |
Specifies if VBR encoding option shall be used or
|
|
Packit |
47f805 |
not, possible values are TRUE/FALSE
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.LHV1.nVBRQuality
|
|
Packit |
47f805 |
Quality option if VBR is enabled (0=highest quality,
|
|
Packit |
47f805 |
9 is lowest quality)
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.LHV1.dwVbrAbr_bps
|
|
Packit |
47f805 |
If the Average Bit Rate is specified, the lame
|
|
Packit |
47f805 |
encoder ignores the nVBRQuality settings (However, bEnableVBR
|
|
Packit |
47f805 |
must be set to TRUE and the format.LHV1.nVbrMethod
|
|
Packit |
47f805 |
parameter should be set to
|
|
Packit |
47f805 |
size="3">VBR_METHOD_ABR). The allowed
|
|
Packit |
47f805 |
range for the </font>format.LHV1.dwVbrAbr_bps parameter
|
|
Packit |
47f805 |
any integer value <font size="3">between:</font>MPEG-I:
|
|
Packit |
47f805 |
32000 .. 320000 bps
|
|
Packit |
47f805 |
MPEG-II: 8000 .. 160000 bps
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.LHV1.bNoBitRes
|
|
Packit |
47f805 |
Disables the bit-resorvoir and disables the insertion
|
|
Packit |
47f805 |
of padded frames
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.LHV1.nQuality
|
|
Packit |
47f805 |
Quality Setting, HIGH BYTE should be NOT LOW byte,
|
|
Packit |
47f805 |
otherwhise quality is set to 5. This is done to be
|
|
Packit |
47f805 |
backward compatible. So to set quality to 3, you have to
|
|
Packit |
47f805 |
set the nQuality parameter to 0xFC03.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
format.mp3.btReserved
|
|
Packit |
47f805 |
For future use, set all elements to zero
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
Synopsis:
|
|
Packit |
47f805 |
BE_ERR beInitStream(
|
|
Packit |
47f805 |
PBE_CONFIG pbeConfig, PDWORD dwSamples,
|
|
Packit |
47f805 |
PDWORD dwBufferSize, PHBE_STREAM phbeStream
|
|
Packit |
47f805 |
)
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
Parameters:
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
cellspacing="10" width="100%">
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
pbeConfig
|
|
Packit |
47f805 |
Pointer at the struct containing encoder
|
|
Packit |
47f805 |
settings.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
dwSamples
|
|
Packit |
47f805 |
Pointer at double word where number of
|
|
Packit |
47f805 |
samples to send to each beEncodeChunk() is
|
|
Packit |
47f805 |
returned.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
dwBufferSize
|
|
Packit |
47f805 |
Pointer at double word where minimum size in
|
|
Packit |
47f805 |
bytes of output buffer is returned.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
phbeStream
|
|
Packit |
47f805 |
Pointer at integer where Stream handle is
|
|
Packit |
47f805 |
returned.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
Description:
|
|
Packit |
47f805 |
This function is the first
|
|
Packit |
47f805 |
to call before starting an encoding stream.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
Synopsis:
|
|
Packit |
47f805 |
BE_ERR beEncodeChunk(
|
|
Packit |
47f805 |
HBE_STREAM hbeStream, DWORD nSamples,
|
|
Packit |
47f805 |
PSHORT pSamples, PBYTE pOutput, PDWORD pdwOutput
|
|
Packit |
47f805 |
)
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
Parameters:
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
width="100%">
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
hbeStream
|
|
Packit |
47f805 |
Handle of the stream.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
nSamples
|
|
Packit |
47f805 |
Number of samples to be encoded for this
|
|
Packit |
47f805 |
call. This should be identical to what is
|
|
Packit |
47f805 |
returned by beInitStream(), unless you are
|
|
Packit |
47f805 |
encoding the last chunk, which might be smaller.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
pSamples
|
|
Packit |
47f805 |
Pointer at the 16-bit signed samples to be
|
|
Packit |
47f805 |
encoded. These should be in stereo when encoding
|
|
Packit |
47f805 |
a stereo MP3 and mono when encoding a mono MP3.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
pOutput
|
|
Packit |
47f805 |
Where to write the encoded data. This buffer
|
|
Packit |
47f805 |
should be at least of the minimum size returned
|
|
Packit |
47f805 |
by beInitStream().
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
pdwOutput
|
|
Packit |
47f805 |
Where to return number of bytes of encoded
|
|
Packit |
47f805 |
data written. The amount of data written might
|
|
Packit |
47f805 |
vary from chunk to chunk.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
Description:
|
|
Packit |
47f805 |
Encodes a chunk of samples. Please
|
|
Packit |
47f805 |
note that if you have set the output to generate mono MP3
|
|
Packit |
47f805 |
files you must feed beEncodeChunk() with mono samples!
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
Synopsis:
|
|
Packit |
47f805 |
BE_ERR beDeinitStream(
|
|
Packit |
47f805 |
HBE_STREAM hbeStream, PBYTE pOutput, PDWORD
|
|
Packit |
47f805 |
pdwOutput )
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
Parameters:
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
width="100%">
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
hbeStream
|
|
Packit |
47f805 |
Handle of the stream.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
pOutput
|
|
Packit |
47f805 |
Where to write the encoded data. This buffer
|
|
Packit |
47f805 |
should be at least of the minimum size returned
|
|
Packit |
47f805 |
by beInitStream().
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
pdwOutput
|
|
Packit |
47f805 |
Where to return number of bytes of encoded
|
|
Packit |
47f805 |
data written.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
Description:
|
|
Packit |
47f805 |
This function should be called after
|
|
Packit |
47f805 |
encoding the last chunk in order to flush the encoder. It
|
|
Packit |
47f805 |
writes any encoded data that still might be left inside
|
|
Packit |
47f805 |
the encoder to the output buffer. This function should
|
|
Packit |
47f805 |
NOT be called unless you have encoded all of the chunks
|
|
Packit |
47f805 |
in your stream.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
Synopsis:
|
|
Packit |
47f805 |
BE_ERR beCloseStream( HBE_STREAM hbeStream
|
|
Packit |
47f805 |
)
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
Parameters:
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
width="100%">
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
hbeStream
|
|
Packit |
47f805 |
Handle of the stream.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
Description:
|
|
Packit |
47f805 |
Last function to be called when finished
|
|
Packit |
47f805 |
encoding a stream. Should unlike beDeinitStream()
|
|
Packit |
47f805 |
also be called if the encoding is canceled.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
Synopsis:
|
|
Packit |
47f805 |
VOID beVersion( PBE_VERSION pbeVersion
|
|
Packit |
47f805 |
)
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
Parameters:
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
width="100%">
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
pbeVersion
|
|
Packit |
47f805 |
Pointer at struct where version number,
|
|
Packit |
47f805 |
release date and URL for homepage is returned.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
Description:
|
|
Packit |
47f805 |
Returns information like version numbers
|
|
Packit |
47f805 |
(both of the DLL and encoding engine), release date and
|
|
Packit |
47f805 |
URL for lame_enc's homepage. All this information should
|
|
Packit |
47f805 |
be made available to the user of your product through a
|
|
Packit |
47f805 |
dialog box or something similar.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
Synopsis:
|
|
Packit |
47f805 |
VOID beWriteVBRHeader( LPCSTR pszMP3FileName
|
|
Packit |
47f805 |
)
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
Parameters:
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
width="100%">
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
pszMP3FileName
|
|
Packit |
47f805 |
Const Pointer zero terminated string, that
|
|
Packit |
47f805 |
contains the MP3 file name.
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
Description:
|
|
Packit |
47f805 |
Writes a Xing Header in front of the MP3
|
|
Packit |
47f805 |
file. Make sure that the MP3 file is closed, and the the
|
|
Packit |
47f805 |
beConfig.format.LHV1.bWriteVBRHeader has been set to
|
|
Packit |
47f805 |
TRUE. In addition, it is always save to call
|
|
Packit |
47f805 |
beWriteVBRHeader after the encoding has been finished,
|
|
Packit |
47f805 |
even when the beConfig.format.LHV1.bWriteVBRHeader is not
|
|
Packit |
47f805 |
set to TRUE
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
The lame_enc.dll has a built-in debug option, that dumps all
|
|
Packit |
47f805 |
the important internal settings to a text file. To enable this
|
|
Packit |
47f805 |
feature, create a text file in the Windows directory which is
|
|
Packit |
47f805 |
named lame_enc.ini, and should contain the following two lines
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
[debug]
|
|
Packit |
47f805 |
WriteLogFile=1
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
Save this text file, and each time you encode a file, the
|
|
Packit |
47f805 |
settings are added to a file name lame_enc.txt, that is located
|
|
Packit |
47f805 |
in the same directory as the lame_enc.dll
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
</body>
|
|
Packit |
47f805 |
</html>
|