Audacity 3.2.0
|
Public Member Functions | |
bool | Initialize (AudacityProject &project, const Parameters ¶meters, const wxFileNameWrapper &filename, double t0, double t1, bool selectedOnly, double sampleRate, unsigned channels, MixerOptions::Downmix *mixerSpec, const Tags *tags) override |
Called before start processing. More... | |
ExportResult | Process (ExportProcessorDelegate &delegate) override |
Public Member Functions inherited from ExportProcessor | |
ExportProcessor (const ExportProcessor &)=delete | |
ExportProcessor & | operator= (const ExportProcessor &)=delete |
ExportProcessor ()=default | |
virtual | ~ExportProcessor () |
virtual bool | Initialize (AudacityProject &project, const Parameters ¶meters, const wxFileNameWrapper &filename, double t0, double t1, bool selectedOnly, double rate, unsigned channels, MixerOptions::Downmix *mixerSpec=nullptr, const Tags *tags=nullptr)=0 |
Called before start processing. More... | |
virtual ExportResult | Process (ExportProcessorDelegate &delegate)=0 |
Static Private Member Functions | |
static int | AskResample (int bitrate, int rate, int lowrate, int highrate) |
static unsigned long | AddTags (ArrayOf< char > &buffer, bool *endOfFile, const Tags *tags) |
Private Attributes | |
struct { | |
TranslatableString status | |
unsigned channels | |
double t0 | |
double t1 | |
MP3Exporter exporter | |
wxFFile outFile | |
ArrayOf< char > id3buffer | |
unsigned long id3len | |
wxFileOffset infoTagPos | |
size_t bufferSize | |
int inSamples | |
std::unique_ptr< Mixer > mixer | |
} | context |
Additional Inherited Members | |
Public Types inherited from ExportProcessor | |
using | Parameters = std::vector< std::tuple< ExportOptionID, ExportValue > > |
Definition at line 1589 of file ExportMP3.cpp.
|
staticprivate |
Definition at line 2120 of file ExportMP3.cpp.
References Tags::GetRange(), name, ArrayOf< X >::reinit(), TAG_ALBUM, TAG_ARTIST, TAG_COMMENTS, TAG_GENRE, TAG_TITLE, TAG_TRACK, and TAG_YEAR.
Referenced by Initialize().
|
staticprivate |
Definition at line 2045 of file ExportMP3.cpp.
References eIsCreating, S, sampRates, wxDialogWrapper::SetName(), XO(), and XXO().
Referenced by Initialize().
|
overridevirtual |
Called before start processing.
project | Processor may access project data, take care to exclude any data race |
parameters | A format-dependent set of parameters used in exporting |
selectedOnly | Set to true if all tracks should be mixed, to false if only the selected tracks should be mixed and exported. |
tags | A Tags object that will over-ride the one in *project and be used to tag the file that is exported. @retern Implementations may simply return false without any error reporting. This is to temporarily preserve old behavior, which is to be removed in the nearest future. |
Implements ExportProcessor.
Definition at line 1773 of file ExportMP3.cpp.
References _, AddTags(), AskResample(), channels, context, ExportPluginHelpers::CreateMixer(), exporter, floatSample, audacity::BasicSettings::Flush(), Tags::Get(), MP3Exporter::GetOutBufferSize(), ExportPluginHelpers::GetParameterValue(), gPrefs, MP3Exporter::InitializeStream(), MP3Exporter::InitLibrary(), MP3Exporter::LoadLibrary(), lrint, make_iterator_range(), MP3Exporter::Maybe, MODE_ABR, MODE_CBR, MODE_SET, MODE_VBR, MP3OptionIDMode, MP3OptionIDQualityABR, MP3OptionIDQualityCBR, MP3OptionIDQualitySET, MP3OptionIDQualityVBR, PRESET_STANDARD, project, QUALITY_2, anonymous_namespace{ClipSegmentTest.cpp}::sampleRate, sampRates, MP3Exporter::SetBitrate(), MP3Exporter::SetMode(), MP3Exporter::SetQuality(), setRateNamesShort, t0, t1, MP3Exporter::ValidLibraryLoaded(), varRateNames, audacity::BasicSettings::Write(), wxT(), and XO().
|
overridevirtual |
Implements ExportProcessor.
Definition at line 1952 of file ExportMP3.cpp.
References context, MP3Exporter::EncodeBuffer(), MP3Exporter::EncodeBufferMono(), MP3Exporter::EncodeRemainder(), MP3Exporter::EncodeRemainderMono(), exporter, MP3Exporter::FinishStream(), MP3Exporter::PutInfoTag(), ExportProcessorDelegate::SetStatusString(), Success, ExportPluginHelpers::UpdateProgress(), and XO().
size_t MP3ExportProcessor::bufferSize |
Definition at line 1602 of file ExportMP3.cpp.
unsigned MP3ExportProcessor::channels |
Definition at line 1594 of file ExportMP3.cpp.
Referenced by Initialize().
struct { ... } MP3ExportProcessor::context |
Referenced by Initialize(), and Process().
MP3Exporter MP3ExportProcessor::exporter |
Definition at line 1597 of file ExportMP3.cpp.
Referenced by Initialize(), and Process().
ArrayOf<char> MP3ExportProcessor::id3buffer |
Definition at line 1599 of file ExportMP3.cpp.
unsigned long MP3ExportProcessor::id3len |
Definition at line 1600 of file ExportMP3.cpp.
wxFileOffset MP3ExportProcessor::infoTagPos |
Definition at line 1601 of file ExportMP3.cpp.
int MP3ExportProcessor::inSamples |
Definition at line 1603 of file ExportMP3.cpp.
std::unique_ptr<Mixer> MP3ExportProcessor::mixer |
Definition at line 1604 of file ExportMP3.cpp.
wxFFile MP3ExportProcessor::outFile |
Definition at line 1598 of file ExportMP3.cpp.
TranslatableString MP3ExportProcessor::status |
Definition at line 1593 of file ExportMP3.cpp.
double MP3ExportProcessor::t0 |
Definition at line 1595 of file ExportMP3.cpp.
Referenced by Initialize().
double MP3ExportProcessor::t1 |
Definition at line 1596 of file ExportMP3.cpp.
Referenced by Initialize().