Audacity  2.2.0
ExportMP3 Class Referencefinal
Inheritance diagram for ExportMP3:

Public Member Functions

 ExportMP3 ()
bool CheckFileName (wxFileName &filename, int format)
wxWindow * OptionsCreate (wxWindow *parent, int format)
ProgressResult Export (AudacityProject *project, unsigned channels, const wxString &fName, bool selectedOnly, double t0, double t1, MixerSpec *mixerSpec=NULL, const Tags *metadata=NULL, int subformat=0) override
 called to export audio into a file. More...
- Public Member Functions inherited from ExportPlugin
 ExportPlugin ()
virtual ~ExportPlugin ()
int AddFormat ()
 Add a NEW entry to the list of formats this plug-in can export. More...
void SetFormat (const wxString &format, int index)
void SetDescription (const wxString &description, int index)
void AddExtension (const wxString &extension, int index)
void SetExtensions (const wxArrayString &extensions, int index)
void SetMask (const wxString &mask, int index)
void SetMaxChannels (unsigned maxchannels, unsigned index)
void SetCanMetaData (bool canmetadata, int index)
virtual int GetFormatCount ()
virtual wxString GetFormat (int index)
virtual wxString GetDescription (int index)
virtual wxString GetExtension (int index=0)
 Return the (first) file name extension for the sub-format. More...
virtual wxArrayString GetExtensions (int index=0)
 Return all the file name extensions used for the sub-format. More...
virtual wxString GetMask (int index)
virtual unsigned GetMaxChannels (int index)
virtual bool GetCanMetaData (int index)
virtual bool IsExtension (const wxString &ext, int index)
virtual bool DisplayOptions (wxWindow *parent, int format=0)

Private Member Functions

int FindValue (CHOICES *choices, int cnt, int needle, int def)
wxString FindName (CHOICES *choices, int cnt, int needle)
int AskResample (int bitrate, int rate, int lowrate, int highrate)
int AddTags (AudacityProject *project, ArrayOf< char > &buffer, bool *endOfFile, const Tags *tags)
int SetNumExportChannels () override
 Exporter plug-ins may override this to specify the number of channels in exported file. -1 for unspecified. More...

Additional Inherited Members

- Protected Member Functions inherited from ExportPlugin
std::unique_ptr< MixerCreateMixer (const WaveTrackConstArray &inputTracks, const TimeTrack *timeTrack, double startTime, double stopTime, unsigned numOutChannels, size_t outBufferSize, bool outInterleaved, double outRate, sampleFormat outFormat, bool highQuality=true, MixerSpec *mixerSpec=NULL)

Constructor & Destructor Documentation

Member Function Documentation

int ExportMP3::AddTags ( AudacityProject project,
ArrayOf< char > &  buffer,
bool *  endOfFile,
const Tags tags 
bool ExportMP3::CheckFileName ( wxFileName &  filename,
int  format 

Reimplemented from ExportPlugin.

References _(), gPrefs, MP3Exporter::LoadLibrary(), and MP3Exporter::Maybe.

ProgressResult ExportMP3::Export ( AudacityProject project,
unsigned  channels,
const wxString &  fName,
bool  selectedOnly,
double  t0,
double  t1,
MixerSpec mixerSpec = NULL,
const Tags metadata = NULL,
int  subformat = 0 

called to export audio into a file.

selectedOnlySet to true if all tracks should be mixed, to false if only the selected tracks should be mixed and exported.
metadataA Tags object that will over-ride the one in *project and be used to tag the file that is exported.
subformatControl which of the multiple formats this exporter is capable of exporting should be used. Used where a single export plug-in handles a number of related formats, but they have separate entries in the Format drop-down list box. For example, the options to export to "Other PCM", "AIFF 16 Bit" and "WAV 16 Bit" are all the same libsndfile export plug-in, but with subformat set to 0, 1, and 2 respectively.

Implements ExportPlugin.

References _(), AddTags(), AskResample(), Cancelled, CHANNEL_JOINT, CHANNEL_MONO, CHANNEL_STEREO, ExportPlugin::CreateMixer(), MP3Exporter::EncodeBuffer(), MP3Exporter::EncodeBufferMono(), MP3Exporter::EncodeRemainder(), MP3Exporter::EncodeRemainderMono(), FindName(), FindValue(), MP3Exporter::FinishStream(), MP3Exporter::GetOutBufferSize(), AudacityProject::GetRate(), AudacityProject::GetTags(), TrackList::GetTimeTrack(), AudacityProject::GetTracks(), TrackList::GetWaveTrackConstArray(), gPrefs, MP3Exporter::InitializeStream(), MP3Exporter::InitLibrary(), MP3Exporter::LoadLibrary(), lrint, MP3Exporter::Maybe, MODE_ABR, MODE_CBR, MODE_SET, MODE_VBR, PRESET_STANDARD, MP3Exporter::PutInfoTag(), QUALITY_2, ROUTINE_FAST, MP3Exporter::SetBitrate(), MP3Exporter::SetChannel(), MP3Exporter::SetMode(), MP3Exporter::SetQuality(), Success, ProgressDialog::Update(), and MP3Exporter::ValidLibraryLoaded().

wxString ExportMP3::FindName ( CHOICES choices,
int  cnt,
int  needle 

References label, and CHOICES::name.

Referenced by Export().

int ExportMP3::FindValue ( CHOICES choices,
int  cnt,
int  needle,
int  def 

References label.

Referenced by Export().

wxWindow * ExportMP3::OptionsCreate ( wxWindow *  parent,
int  format 

Implements ExportPlugin.

References safenew.

int ExportMP3::SetNumExportChannels ( )

Exporter plug-ins may override this to specify the number of channels in exported file. -1 for unspecified.

Reimplemented from ExportPlugin.

References gPrefs.

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