Audacity 3.2.0
|
Public Member Functions | |
PCMExportProcessor (int subformat) | |
~PCMExportProcessor () override | |
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 ArrayOf< char > | AdjustString (const wxString &wxStr, int sf_format) |
static void | AddStrings (SNDFILE *sf, const Tags *tags, int sf_format) |
static bool | AddID3Chunk (const wxFileNameWrapper &fName, const Tags *tags, int sf_format) |
Private Attributes | |
struct { | |
int subformat | |
double t0 | |
double t1 | |
std::unique_ptr< Mixer > mixer | |
TranslatableString status | |
SF_INFO info | |
sampleFormat format | |
wxFile f | |
SNDFILE * sf | |
int sf_format | |
wxFileNameWrapper fName | |
int fileFormat | |
std::unique_ptr< Tags > metadata | |
} | context |
Static Private Attributes | |
static constexpr size_t | maxBlockLen = 44100 * 5 |
Additional Inherited Members | |
Public Types inherited from ExportProcessor | |
using | Parameters = std::vector< std::tuple< ExportOptionID, ExportValue > > |
Definition at line 378 of file ExportPCM.cpp.
|
inline |
Definition at line 401 of file ExportPCM.cpp.
|
inlineoverride |
|
staticprivate |
Definition at line 950 of file ExportPCM.cpp.
References f, fName, Tags::GetRange(), anonymous_namespace{ExportPCM.cpp}::name, sf_format, TAG_ALBUM, TAG_ARTIST, TAG_COMMENTS, TAG_GENRE, TAG_TITLE, TAG_TRACK, TAG_YEAR, and wxT().
Referenced by Process().
|
staticprivate |
Definition at line 877 of file ExportPCM.cpp.
References AdjustString(), Tags::GetTag(), Tags::HasTag(), sf, sf_format, TAG_ALBUM, TAG_ARTIST, TAG_COMMENTS, TAG_COPYRIGHT, TAG_GENRE, TAG_SOFTWARE, TAG_TITLE, TAG_TRACK, and TAG_YEAR.
Referenced by Initialize(), and Process().
|
staticprivate |
Definition at line 790 of file ExportPCM.cpp.
References sf_format.
Referenced by AddStrings().
|
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 536 of file ExportPCM.cpp.
References _, AddStrings(), context, ExportPluginHelpers::CreateMixer(), f, fileFormat, floatSample, anonymous_namespace{ExportPCM.cpp}::FMT_AIFF, anonymous_namespace{ExportPCM.cpp}::FMT_WAV, fName, Tags::Get(), ExportPluginHelpers::GetParameterValue(), info, int16Sample, maxBlockLen, metadata, anonymous_namespace{ExportPCM.cpp}::OptionIDSFType, project, anonymous_namespace{ClipSegmentTest.cpp}::sampleRate, sf, sf_format, sf_header_name(), sf_subtype_bytes_per_sample(), sf_subtype_is_integer(), sf_subtype_more_than_16_bits(), t0, t1, wxT(), and XO().
|
overridevirtual |
Implements ExportProcessor.
Definition at line 689 of file ExportPCM.cpp.
References AddID3Chunk(), AddStrings(), AudacityMessageBox(), Cancelled, context, CopySamples(), Error, gHighQualityDither, GuardedCall(), int16Sample, int24Sample, maxBlockLen, none, SAMPLE_SIZE, ExportProcessorDelegate::SetStatusString(), Success, ExportPluginHelpers::UpdateProgress(), FileException::Write, and XO().
struct { ... } PCMExportProcessor::context |
Referenced by Initialize(), PCMExportProcessor(), Process(), and ~PCMExportProcessor().
wxFile PCMExportProcessor::f |
Definition at line 391 of file ExportPCM.cpp.
Referenced by AddID3Chunk(), and Initialize().
int PCMExportProcessor::fileFormat |
Definition at line 395 of file ExportPCM.cpp.
Referenced by Initialize().
wxFileNameWrapper PCMExportProcessor::fName |
Definition at line 394 of file ExportPCM.cpp.
Referenced by AddID3Chunk(), and Initialize().
sampleFormat PCMExportProcessor::format |
Definition at line 390 of file ExportPCM.cpp.
SF_INFO PCMExportProcessor::info |
Definition at line 389 of file ExportPCM.cpp.
Referenced by Initialize().
|
staticconstexprprivate |
Definition at line 380 of file ExportPCM.cpp.
Referenced by Initialize(), and Process().
std::unique_ptr<Tags> PCMExportProcessor::metadata |
Definition at line 396 of file ExportPCM.cpp.
Referenced by Initialize().
std::unique_ptr<Mixer> PCMExportProcessor::mixer |
Definition at line 387 of file ExportPCM.cpp.
SNDFILE* PCMExportProcessor::sf |
Definition at line 392 of file ExportPCM.cpp.
Referenced by AddStrings(), and Initialize().
int PCMExportProcessor::sf_format |
Definition at line 393 of file ExportPCM.cpp.
Referenced by AddID3Chunk(), AddStrings(), AdjustString(), and Initialize().
TranslatableString PCMExportProcessor::status |
Definition at line 388 of file ExportPCM.cpp.
int PCMExportProcessor::subformat |
Definition at line 384 of file ExportPCM.cpp.
Referenced by PCMExportProcessor().
double PCMExportProcessor::t0 |
Definition at line 385 of file ExportPCM.cpp.
Referenced by Initialize().
double PCMExportProcessor::t1 |
Definition at line 386 of file ExportPCM.cpp.
Referenced by Initialize().