43 mSelectedOnly = selectedOnly;
49 mParameters = std::move(parameters);
55 mNumChannels = numChannels;
68 mMixerSpec = mixerSpec;
92 while (filename.FileExists()) {
94 wxString::Format(
wxT(
"%d"), suffix));
99 if(!processor->Initialize(
project,
112 processor = std::shared_ptr<ExportProcessor>(processor.release())]
115 auto result = ExportResult::Error;
116 auto cleanup = finally( [&] {
117 if(result == ExportResult::Success || result == ExportResult::Stopped)
119 if (actualFilename != targetFilename)
122 ::wxRenameFile(actualFilename.GetFullPath(),
123 targetFilename.GetFullPath(),
128 ::wxRemoveFile(actualFilename.GetFullPath());
130 result = processor->Process(delegate);
140 "Error:_Disk_full_or_not_writable"
161 ErrorDialogOptions { allowReporting ? ErrorDialogType::ModalErrorReport : ErrorDialogType::ModalError });
Toolkit-neutral facade for basic user interface services.
void ShowDiskFullExportErrorDialog(const wxFileNameWrapper &fileName)
void ShowExportErrorDialog(const TranslatableString &message, const TranslatableString &caption, bool allowReporting)
std::packaged_task< ExportResult(ExportProcessorDelegate &)> ExportTask
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
virtual std::unique_ptr< ExportProcessor > CreateProcessor(int format) const =0
std::vector< std::tuple< ExportOptionID, ExportValue > > Parameters
ExportTaskBuilder & SetPlugin(const ExportPlugin *plugin, int format=0) noexcept
ExportTaskBuilder & SetTags(const Tags *tags) noexcept
ExportProcessor::Parameters mParameters
ExportTaskBuilder & SetMixerSpec(MixerOptions::Downmix *mixerSpec) noexcept
MixerOptions::Downmix * mMixerSpec
ExportTask Build(AudacityProject &project)
ExportTaskBuilder & SetParameters(ExportProcessor::Parameters parameters) noexcept
ExportTaskBuilder & SetNumChannels(unsigned numChannels) noexcept
ExportTaskBuilder & SetSampleRate(double sampleRate) noexcept
ExportTaskBuilder & SetFileName(const wxFileName &filename)
const ExportPlugin * mPlugin
ExportTaskBuilder & SetRange(double t0, double t1, bool selectedOnly=false) noexcept
static TranslatableString WriteFailureMessage(const wxFileName &fileName)
A matrix of booleans, one row per input channel, column per output.
unsigned GetNumChannels() const
Holds a msgid for the translation catalog; may also bind format arguments.
void ShowErrorDialog(const WindowPlacement &placement, const TranslatableString &dlogTitle, const TranslatableString &message, const ManualPageID &helpPage, const ErrorDialogOptions &options={})
Show an error dialog with a link to the manual for further help.
constexpr auto sampleRate
Options for variations of error dialogs; the default is for modal dialogs.