Audacity 3.2.0
Export.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 Export.h
6
7 Dominic Mazzoni
8
9**********************************************************************/
10
11#ifndef __AUDACITY_EXPORT__
12#define __AUDACITY_EXPORT__
13
14#include <functional>
15#include <vector>
16#include <wx/filename.h> // member variable
17#include "Identifier.h"
18#include "FileNames.h" // for FileTypes
19
20#include "Registry.h"
21#include "ExportPlugin.h"
22
23class AudacityProject;
24class WaveTrack;
26namespace MixerOptions{ class Downmix; }
28using WaveTrackConstArray = std::vector < std::shared_ptr < const WaveTrack > >;
29
30using ExportPluginArray = std::vector < std::unique_ptr< ExportPlugin > > ;
31
32class IMPORT_EXPORT_API ExportTaskBuilder final
33{
34public:
35
38
39 ExportTaskBuilder& SetFileName(const wxFileName& filename);
40 ExportTaskBuilder& SetRange(double t0, double t1, bool selectedOnly = false) noexcept;
41 ExportTaskBuilder& SetParameters(ExportProcessor::Parameters parameters) noexcept;
42 ExportTaskBuilder& SetNumChannels(unsigned numChannels) noexcept;
43 ExportTaskBuilder& SetPlugin(const ExportPlugin* plugin, int format = 0) noexcept;
44 ExportTaskBuilder& SetTags(const Tags* tags) noexcept;
45 ExportTaskBuilder& SetSampleRate(double sampleRate) noexcept;
46 ExportTaskBuilder& SetMixerSpec(MixerOptions::Downmix* mixerSpec) noexcept;
47
49
50private:
51 wxFileName mFileName;
52 double mT0 {};
53 double mT1 {};
54 bool mSelectedOnly{};
55 unsigned mNumChannels{1};
56 double mSampleRate{44100};
58 const ExportPlugin* mPlugin{};
59 int mFormat{};
60 MixerOptions::Downmix* mMixerSpec{};//Should be const
61 const Tags* mTags{};
62};
63
64void IMPORT_EXPORT_API ShowExportErrorDialog(const TranslatableString& message,
65 const TranslatableString& caption,
66 bool allowReporting);
67
68void IMPORT_EXPORT_API ShowExportErrorDialog(const TranslatableString& message,
69 const TranslatableString& caption,
70 const ManualPageID& helpPageId,
71 bool allowReporting);
72
73void IMPORT_EXPORT_API ShowDiskFullExportErrorDialog(const wxFileNameWrapper &fileName);
74
75#endif
void IMPORT_EXPORT_API ShowDiskFullExportErrorDialog(const wxFileNameWrapper &fileName)
Definition: Export.cpp:135
void IMPORT_EXPORT_API ShowExportErrorDialog(const TranslatableString &message, const TranslatableString &caption, bool allowReporting)
Definition: Export.cpp:144
std::vector< std::unique_ptr< ExportPlugin > > ExportPluginArray
Definition: Export.h:30
std::packaged_task< ExportResult(ExportProcessorDelegate &)> ExportTask
Definition: ExportTypes.h:31
std::vector< std::shared_ptr< const WaveTrack > > WaveTrackConstArray
const auto project
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
std::vector< std::tuple< ExportOptionID, ExportValue > > Parameters
Definition: ExportPlugin.h:93
ExportProcessor::Parameters mParameters
Definition: Export.h:57
A matrix of booleans, one row per input channel, column per output.
Definition: MixerOptions.h:32
ID3 Tags (for MP3)
Definition: Tags.h:73
Holds a msgid for the translation catalog; may also bind format arguments.
A Track that contains audio waveform data.
Definition: WaveTrack.h:203