Main Page   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

ALameDLL Class Reference

AlameDLL is the class that handle all the accesses to the fucntions contained in the lame DLL. More...

#include <ALameDLL.h>

List of all members.

Public Methods

 ALameDLL ()
 The default constructor.

virtual ~ALameDLL ()
 The default destructor.

bool Load (const char *DllLocation)
 Load the DLL at the location specified. More...

void Free (void)
 Free the DLL if it was loaded.

BE_ERR InitStream (PBE_CONFIG pbeConfig, PDWORD dwSamples, PDWORD dwBufferSize) const
 Init the MP3 stream. More...

BE_ERR EncodeChunk (DWORD nSamples, PSHORT pSamples, PBYTE pOutput, PDWORD pdwOutput) const
 Encode some audio data in the MP3 stream. More...

BE_ERR DeinitStream (PBYTE pOutput, PDWORD pdwOutput) const
 DeInit the MP3 stream. More...

BE_ERR CloseStream () const
 Close the MP3 stream. More...

void WriteVBRHeader (LPCSTR pszMP3FileName) const
 Write the VBR/Xing header in the MP3 file. More...

void Version (BE_VERSION *ver) const
 Retreive the informations about the loaded DLL. More...

bool IsLoaded () const
 return wether the DLL is Loaded and have all the known functions inited.

DWORD GetFullLocation (TCHAR *output, const int BufferSize) const
 Retreive the DLL full path. More...


Detailed Description

AlameDLL is the class that handle all the accesses to the fucntions contained in the lame DLL.

Definition at line 41 of file ALameDLL.h.


Member Function Documentation

BE_ERR ALameDLL::CloseStream const [inline]
 

Close the MP3 stream.

Note:
Last function to be called when finished encoding a stream. Should unlike DeinitStream() also be called if the encoding is canceled

Returns:
BE_ERR_SUCCESSFUL if successfull

Definition at line 133 of file ALameDLL.h.

Referenced by AOut::close().

BE_ERR ALameDLL::DeinitStream PBYTE pOutput,
PDWORD pdwOutput
const [inline]
 

DeInit the MP3 stream.

Note:
This function should be called after encoding the last chunk in order to flush the encoder. It writes any encoded data that still might be left inside the encoder to the output buffer. This function should NOT be called unless you have encoded all of the chunks in your stream
Parameters:
pOutput   Where to write the encoded data. This buffer should be at least of the minimum size returned by InitStream()
pdwOutput   Where to return number of bytes of encoded data written

Returns:
BE_ERR_SUCCESSFUL if successfull

Definition at line 118 of file ALameDLL.h.

Referenced by AOut::close().

BE_ERR ALameDLL::EncodeChunk DWORD nSamples,
PSHORT pSamples,
PBYTE pOutput,
PDWORD pdwOutput
const [inline]
 

Encode some audio data in the MP3 stream.

Note:
If you have set the output to generate mono MP3 files you must feed EncodeChunk() with mono samples !
Parameters:
nSamples   Number of samples to be encoded for this call. This should be identical to what is returned by InitStream(), unless you are encoding the last chunk, which might be smaller
pSamples   Pointer at the 16-bit signed samples to be encoded. These should be in stereo when encoding a stereo MP3 and mono when encoding a mono MP3
pOutput   Where to write the encoded data. This buffer should be at least of the minimum size returned by InitStream().
pdwOutput   Where to return number of bytes of encoded data written. The amount of data written might vary from chunk to chunk

Returns:
BE_ERR_SUCCESSFUL if successfull

Definition at line 98 of file ALameDLL.h.

Referenced by AOut::close(), and AOut::write().

DWORD ALameDLL::GetFullLocation TCHAR * output,
const int BufferSize
const [inline]
 

Retreive the DLL full path.

Parameters:
output   the buffer in which the location will be copied
BufferSize   the size of this buffer to fill

Returns:
the number of TCHAR succesfully copied (0 if any error occur)

Definition at line 189 of file ALameDLL.h.

BE_ERR ALameDLL::InitStream PBE_CONFIG pbeConfig,
PDWORD dwSamples,
PDWORD dwBufferSize
const [inline]
 

Init the MP3 stream.

Note:
This function is the first to call before starting an encoding stream
Parameters:
pbeConfig   Pointer at the struct containing encoder settings
dwSamples   Pointer at double word where number of samples to send to each beEncodeChunk() is returned
dwBufferSize   Pointer at double word where minimum size in bytes of output buffer is returned

Returns:
BE_ERR_SUCCESSFUL if successfull

Definition at line 78 of file ALameDLL.h.

Referenced by AOut::open().

bool ALameDLL::Load const char * DllLocation
 

Load the DLL at the location specified.

Parameters:
DllLocation   A NULL terminated string corresponding to the DLL Location (with PATH as for LoadLibrary)
Returns:
true if the DLL is successfully loaded in memory (false otherwise)

Definition at line 40 of file ALameDLL.cpp.

Referenced by AOut::GetLameVersion(), and AOut::open().

void ALameDLL::Version BE_VERSION * ver const [inline]
 

Retreive the informations about the loaded DLL.

Note:
Returns information like version numbers (both of the DLL and encoding engine), release date and URL for lame_enc's homepage. All this information should be made available to the user of your product through a dialog box or something similar
Parameters:
ver   Pointer at struct where version number, release date and URL for homepage is returned

Definition at line 166 of file ALameDLL.h.

Referenced by AOut::GetLameVersion().

void ALameDLL::WriteVBRHeader LPCSTR pszMP3FileName const [inline]
 

Write the VBR/Xing header in the MP3 file.

Warning:
Make sure that the MP3 file is closed, and the the beConfig.format.LHV1.bWriteVBRHeader has been set to TRUE.
Note:
In addition, it is always safe to call beWriteVBRHeader after the encoding has been finished, even when the beConfig.format.LHV1.bWriteVBRHeader is not set to TRUE
Parameters:
pszMP3FileName   The filename where the VBR stats should be written

Definition at line 151 of file ALameDLL.h.

Referenced by AOut::close().


The documentation for this class was generated from the following files:
Generated at Tue Aug 21 21:10:49 2001 for out_lame by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001