<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>Lame-</title>
</head>
<body bgcolor="#FFFFFF">
<p align="center"> </p>
<p align="center"><font size="7">Lame-enc DLL</font> <br>
<font size="5">Interface version 1.32</font> (and above)<br>
(Lame engine version: 3.93 or higher) <br>
<font size="6">Programmers Manual</font></p>
<p align="center"><i>The lame_enc.dll and this manual is
copyright by Albert L Faber<br>
Originally the the DLL interface is modeled after the BladeEnc
DLL interface<br>
which is copyrighted by Tord Jansson and Jukka Poikolainen<br>
This document and the DLL interface may be distributed freely</i>
<br>
<i>as long as modifications are released under the LGPL license.</i>
</p>
<p align="center"> </p>
<p align="center"><b>Homepage</b>: <a
href="http://www.cdex.n3.net">http://www.cdex.n3.net</a><br>
<b>E-mail:</b> mailto: <a
href="mailto:afaber@users.sourceforge.net">afaber@users.sourceforge.net</a>
</p>
<p><br>
<br>
<br>
<br>
</p>
<p><font size="5">Distribution</font> </p>
<p>People and companies who wants to distribute
lame_enc.dll with their commercial products are free to do so as
far as I'm concerned (LGPL license), but should be aware that
lame_enc.dll might infringe certain MP3 related software patents
held by Fraunhofer IIS in certain countries. </p>
<p><br>
</p>
<p><font size="5">Disclaimer</font> </p>
<p>lame_enc.dll and this manual is distributed 'as is' with no
warranty of any kind. The Author is not to be held responsible
for the result of any use or misuse of this product. <br>
<br>
</p>
<p><font size="5">Current Bugs and Limitations</font> </p>
<p>Although the interface is designed to be able to handle
multiple parallel streams it can't be done yet due to limitations
in the engine, only one stream is allowed. <br>
</p>
<p><font size="5">Future Compatibility</font> </p>
<p>This interface should be compatible with all future versions
of lame_enc.DLL without any need to recompile your programs. You
should therefore <b>not</b> check the version number upon start
and prevent users from running your program with a later version
of lame_enc.DLL. <br>
</p>
<hr>
<p><font size="5">How to use the DLL</font> </p>
<p>1. Fill in a <a href="#The BE_CONFIG Structure">BE_CONFIG </a>structure
and send it to <a href="#beInitStream()">beInitStream()</a>. Make
sure that BE_ERR_SUCCESSFUL is returned. </p>
<p>2. Reserve at least the amount of memory returned in
dwBufferSize as your output buffer. </p>
<p>3. Call <a href="#beEncodeChunk()">beEncodeChunk()</a> until
you've encoded everything you want. </p>
<p>4. Call <a href="#beDeinitStream()">beDeinitStream()</a> to
make sure that all encoded data is flushed out before closing the
stream. </p>
<p>5. Close the stream using <a href="#beCloseStream()">beCloseStream()
</a></p>
<p>6. Finally, call the <a href="#beWriteVBRHeader()">beWriteVBRHeader()</a>
functions, to insert the INFO tag MP3 Header. This is an
extension of the Xing VBR tag which is also used for CBR
encodings. This call can only be omitted if the INFO tag was
explicilty disabled in the BE_CONFIG Structure.</p>
<p>A handy feature is the available <a
href="#Lame_enc.dll debug option">Lame_enc.dll debug option</a>,
which will dump the important lame internal settings to a text
file.<br>
</p>
<p> </p>
<p><font size="5">Return Values</font> </p>
<p>See the header-file for a complete list of function return
values. All functions should return BE_ERR_SUCCESSFUL unless
something went wrong. <br>
</p>
<hr>
<h1><a name="Type definitions"><font size="5">Type definitions</font></a></h1>
<p>The DLL is by default compiled with the MS Visual C/C++
compiler, which has the following type definitions:</p>
<table border="0">
<tr>
<td>Type </td>
<td>Description</td>
</tr>
<tr>
<td>CHAR</td>
<td>signed char (8 bits)</td>
</tr>
<tr>
<td>BYTE</td>
<td>unsigned char (8 bits)</td>
</tr>
<tr>
<td>SHORT</td>
<td>signed short (16 bits)</td>
</tr>
<tr>
<td>WORD</td>
<td>unsigned short (16 bits)</td>
</tr>
<tr>
<td>INT</td>
<td>signed long (32 bits)</td>
</tr>
<tr>
<td>LONG</td>
<td>signed long (32 bits)</td>
</tr>
<tr>
<td>BOOL</td>
<td>signed long (32 bits) (YES, 32 bits for a one bit
value)<br>
TRUE = 0<br>
FALSE=-1</td>
</tr>
<tr>
<td>DWORD</td>
<td>unsigned long (32 bits)</td>
</tr>
<tr>
<td>FLOAT</td>
<td>floating point (32 bits)</td>
</tr>
<tr>
<td>DOUBLE</td>
<td>float point (64 bits)</td>
</tr>
<tr>
<td>LPCSTR</td>
<td>const char* (32 bits pointer to zero terminated
character string)</td>
</tr>
</table>
<p>Within the lame_enc.dll All the structure elements are one
byte alligned (due to backwards compatibility with BladEnc.DLL!</p>
<p> </p>
<hr>
<h1><a name="The BE_CONFIG Structure"><font size="5">The
BE_CONFIG Structure </font></a></h1>
<p><font size="3">Currently there the BE_CONFIG structure has to
varians, the old MP3 config structure that is truly compatible
with the old BladeEnc interface, and the new defined LHV1
structure, which can set far more options in the lame encoder</font></p>
<p> </p>
<h2><font size="5">The MP3 BE_CONFIG - structure (OBSOLETE)</font></h2>
<p>This is the old structure as it was originally defined by the
BladeEnc.DLL interface. However, I do highly recommend to use the
new Lame specific config structure, since it gives you more
control over the Lame encoder settings.</p>
<p>These are the members of the BE_CONFIG structure you need to
fill in before you call beInitStream(): <br>
</p>
<table border="0">
<tr>
<td><b>dwConfig</b></td>
<td>Specifies what kind of output you want. Since only
MP3 currently is supported you must set this to <b>BE_CONFIG_MP3</b></td>
</tr>
<tr>
<td><b>format.mp3.dwSampleRate</b> </td>
<td>Samplerate in Hz for MP3 file. This can be set to
either <b>32000</b>, <b>44100</b> or <b>48000</b>.</td>
</tr>
<tr>
<td><b>format.mp3.byMode</b></td>
<td>Stereomode for MP3 file. This can be either <b>BE_MP3_MODE_STEREO</b>,
<b>BE_MP3_MODE_DUALCHANNEL</b> or <b>BE_MP3_MODE_MONO.</b></td>
</tr>
<tr>
<td><b>format.mp3.bitrate</b></td>
<td>Bitrate (i.e. size) of MP3 file in kBit/s. Allowed
bitrates are: <b>32, 40, 48, 56, 64, 80, 96, 112, 128,
160, 192, 224, 256</b> and <b>320</b>.</td>
</tr>
<tr>
<td><b>format.mp3.bCopyright</b></td>
<td>If this is set to TRUE the Copyright bit in the MP3
stream will be set.</td>
</tr>
<tr>
<td><b>format.mp3.bCRC</b></td>
<td>Set this to TRUE in order to enable CRC-checksum in
the bitstream.</td>
</tr>
<tr>
<td><b>format.mp3.bOriginal</b></td>
<td>If this is set to TRUE the Original bit in the MP3
stream will be set.</td>
</tr>
<tr>
<td><b>format.mp3.bPrivate</b></td>
<td>If this is set to TRUE the Private bit in the MP3
stream will be set.</td>
</tr>
</table>
<p> </p>
<h2><font size="5">The LHV1 BE_CONFIG - structure (recommended)</font></h2>
<p>These are the members of the LHV1 BE_CONFIG structure, you
need to fill in before you call beInitStream(): <br>
</p>
<table border="0">
<tr>
<td><b>dwConfig</b></td>
<td>Specifies what kind of output you want. Since only
MP3 currently is supported you must set this to <b>BE_CONFIG_LAME</b></td>
</tr>
<tr>
<td> </td>
<td> </td>
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
MP3Encoder_example_Lame.rar (9个子文件)
Example
testcase.wav 98KB
MainForm.dfm 671B
enMain.pas 14KB
lame_enc.dll 392KB
MP3export.pas 12KB
LameDLLInterface.htm 24KB
WAV2MP3.res 876B
MainForm.pas 741B
WAV2MP3.dpr 226B
共 9 条
- 1
onebigday
- 粉丝: 135
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
- 5
前往页