Audacity  2.2.0
MP3Exporter Class Reference

Class used to export MP3 files. More...

Public Types

enum  AskUser { No, Maybe, Yes }
 

Public Member Functions

 MP3Exporter ()
 
virtual ~MP3Exporter ()
 
bool FindLibrary (wxWindow *parent)
 
bool LoadLibrary (wxWindow *parent, AskUser askuser)
 
bool ValidLibraryLoaded ()
 
void SetMode (int mode)
 
void SetBitrate (int rate)
 
void SetQuality (int q, int r)
 
void SetChannel (int mode)
 
bool InitLibrary (wxString libpath)
 
void FreeLibrary ()
 
wxString GetLibraryVersion ()
 
wxString GetLibraryName ()
 
wxString GetLibraryPath ()
 WXMAC More...
 
wxString GetLibraryTypeString ()
 
int InitializeStream (unsigned channels, int sampleRate)
 
int GetOutBufferSize ()
 
int EncodeBuffer (short int inbuffer[], unsigned char outbuffer[])
 
int EncodeRemainder (short int inbuffer[], int nSamples, unsigned char outbuffer[])
 
int EncodeBufferMono (short int inbuffer[], unsigned char outbuffer[])
 
int EncodeRemainderMono (short int inbuffer[], int nSamples, unsigned char outbuffer[])
 
int FinishStream (unsigned char outbuffer[])
 
void CancelEncoding ()
 
void PutInfoTag (wxFFile &f, wxFileOffset off)
 

Private Attributes

wxString mLibPath
 
wxDynamicLibrary lame_lib
 
bool mLibraryLoaded
 
bool mEncoding
 
int mMode
 
int mBitrate
 
int mQuality
 
int mRoutine
 
int mChannel
 
lame_init_tlame_init
 
lame_init_params_tlame_init_params
 
lame_encode_buffer_tlame_encode_buffer
 
lame_encode_buffer_interleaved_tlame_encode_buffer_interleaved
 
lame_encode_flush_tlame_encode_flush
 
lame_close_tlame_close
 
get_lame_version_tget_lame_version
 
lame_set_in_samplerate_tlame_set_in_samplerate
 
lame_set_out_samplerate_tlame_set_out_samplerate
 
lame_set_num_channels_tlame_set_num_channels
 
lame_set_quality_tlame_set_quality
 
lame_set_brate_tlame_set_brate
 
lame_set_VBR_tlame_set_VBR
 
lame_set_VBR_q_tlame_set_VBR_q
 
lame_set_VBR_min_bitrate_kbps_tlame_set_VBR_min_bitrate_kbps
 
lame_set_mode_tlame_set_mode
 
lame_set_preset_tlame_set_preset
 
lame_set_error_protection_tlame_set_error_protection
 
lame_set_disable_reservoir_tlame_set_disable_reservoir
 
lame_set_padding_type_tlame_set_padding_type
 
lame_set_bWriteVbrTag_tlame_set_bWriteVbrTag
 
lame_get_lametag_frame_tlame_get_lametag_frame
 
lame_mp3_tags_fid_tlame_mp3_tags_fid
 
lame_global_flagsmGF
 
unsigned char mInfoTagBuf [2880]
 
size_t mInfoTagLen
 

Static Private Attributes

static const int mSamplesPerChunk = 220500
 
static const int mOutBufferSize
 

Detailed Description

Class used to export MP3 files.

Member Enumeration Documentation

Enumerator
No 
Maybe 
Yes 

Constructor & Destructor Documentation

MP3Exporter::~MP3Exporter ( )
virtual

References FreeLibrary().

Member Function Documentation

void MP3Exporter::CancelEncoding ( )

References mEncoding.

int MP3Exporter::EncodeBuffer ( short int  inbuffer[],
unsigned char  outbuffer[] 
)
int MP3Exporter::EncodeBufferMono ( short int  inbuffer[],
unsigned char  outbuffer[] 
)
int MP3Exporter::EncodeRemainder ( short int  inbuffer[],
int  nSamples,
unsigned char  outbuffer[] 
)
int MP3Exporter::EncodeRemainderMono ( short int  inbuffer[],
int  nSamples,
unsigned char  outbuffer[] 
)
bool MP3Exporter::FindLibrary ( wxWindow *  parent)
int MP3Exporter::FinishStream ( unsigned char  outbuffer[])
void MP3Exporter::FreeLibrary ( )

References lame_close, lame_lib, and mGF.

Referenced by LoadLibrary(), and ~MP3Exporter().

wxString MP3Exporter::GetLibraryName ( )

Referenced by FindLibrary(), and LoadLibrary().

wxString MP3Exporter::GetLibraryPath ( )

WXMAC

Referenced by FindLibrary(), and LoadLibrary().

wxString MP3Exporter::GetLibraryTypeString ( )

References _().

Referenced by FindLibrary().

wxString MP3Exporter::GetLibraryVersion ( )

References get_lame_version, and mLibraryLoaded.

Referenced by GetMP3Version().

int MP3Exporter::GetOutBufferSize ( )

References mEncoding, and mOutBufferSize.

Referenced by ExportMP3::Export().

bool MP3Exporter::LoadLibrary ( wxWindow *  parent,
AskUser  askuser 
)
void MP3Exporter::PutInfoTag ( wxFFile &  f,
wxFileOffset  off 
)
void MP3Exporter::SetBitrate ( int  rate)

References mBitrate.

Referenced by ExportMP3::Export().

void MP3Exporter::SetChannel ( int  mode)

References mChannel.

Referenced by ExportMP3::Export().

void MP3Exporter::SetMode ( int  mode)

References mMode.

Referenced by ExportMP3::Export().

void MP3Exporter::SetQuality ( int  q,
int  r 
)

References mQuality, and mRoutine.

Referenced by ExportMP3::Export().

bool MP3Exporter::ValidLibraryLoaded ( )

References mLibraryLoaded.

Referenced by ExportMP3::Export(), and LoadLibrary().

Member Data Documentation

get_lame_version_t* MP3Exporter::get_lame_version
private

Referenced by GetLibraryVersion(), and InitLibrary().

lame_close_t* MP3Exporter::lame_close
private

Referenced by FreeLibrary(), and InitLibrary().

lame_encode_buffer_t* MP3Exporter::lame_encode_buffer
private
lame_encode_buffer_interleaved_t* MP3Exporter::lame_encode_buffer_interleaved
private
lame_encode_flush_t* MP3Exporter::lame_encode_flush
private

Referenced by FinishStream(), and InitLibrary().

lame_get_lametag_frame_t* MP3Exporter::lame_get_lametag_frame
private

Referenced by FinishStream(), and InitLibrary().

lame_init_t* MP3Exporter::lame_init
private

Referenced by InitLibrary().

lame_init_params_t* MP3Exporter::lame_init_params
private

Referenced by InitializeStream(), and InitLibrary().

wxDynamicLibrary MP3Exporter::lame_lib
private

Referenced by FreeLibrary(), and InitLibrary().

lame_mp3_tags_fid_t* MP3Exporter::lame_mp3_tags_fid
private

Referenced by InitLibrary(), and PutInfoTag().

lame_set_brate_t* MP3Exporter::lame_set_brate
private

Referenced by InitializeStream(), and InitLibrary().

lame_set_bWriteVbrTag_t* MP3Exporter::lame_set_bWriteVbrTag
private

Referenced by InitializeStream(), and InitLibrary().

lame_set_disable_reservoir_t* MP3Exporter::lame_set_disable_reservoir
private

Referenced by InitializeStream(), and InitLibrary().

lame_set_error_protection_t* MP3Exporter::lame_set_error_protection
private

Referenced by InitializeStream(), and InitLibrary().

lame_set_in_samplerate_t* MP3Exporter::lame_set_in_samplerate
private

Referenced by InitializeStream(), and InitLibrary().

lame_set_mode_t* MP3Exporter::lame_set_mode
private

Referenced by InitializeStream(), and InitLibrary().

lame_set_num_channels_t* MP3Exporter::lame_set_num_channels
private

Referenced by InitializeStream(), and InitLibrary().

lame_set_out_samplerate_t* MP3Exporter::lame_set_out_samplerate
private

Referenced by InitializeStream(), and InitLibrary().

lame_set_padding_type_t* MP3Exporter::lame_set_padding_type
private

Referenced by InitializeStream(), and InitLibrary().

lame_set_preset_t* MP3Exporter::lame_set_preset
private

Referenced by InitializeStream(), and InitLibrary().

lame_set_quality_t* MP3Exporter::lame_set_quality
private

Referenced by InitLibrary().

lame_set_VBR_t* MP3Exporter::lame_set_VBR
private

Referenced by InitializeStream(), and InitLibrary().

lame_set_VBR_min_bitrate_kbps_t* MP3Exporter::lame_set_VBR_min_bitrate_kbps
private

Referenced by InitLibrary().

lame_set_VBR_q_t* MP3Exporter::lame_set_VBR_q
private

Referenced by InitializeStream(), and InitLibrary().

int MP3Exporter::mBitrate
private
int MP3Exporter::mChannel
private
unsigned char MP3Exporter::mInfoTagBuf[2880]
private

Referenced by FinishStream(), and PutInfoTag().

size_t MP3Exporter::mInfoTagLen
private
wxString MP3Exporter::mLibPath
private
bool MP3Exporter::mLibraryLoaded
private
int MP3Exporter::mMode
private
const int MP3Exporter::mOutBufferSize
staticprivate
Initial value:
=
mSamplesPerChunk * (320 / 8) / 8 + 4 * 1152 * (320 / 8) / 8 + 512

Referenced by EncodeBuffer(), EncodeBufferMono(), EncodeRemainder(), EncodeRemainderMono(), FinishStream(), and GetOutBufferSize().

int MP3Exporter::mQuality
private
int MP3Exporter::mRoutine
private
const int MP3Exporter::mSamplesPerChunk = 220500
staticprivate

The documentation for this class was generated from the following file: