Audacity 3.2.0
ImportUtils.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 ImportUtils.h
6
7 Dominic Mazzoni
8
9 Vitaly Sverchinsky split from ImportPlugin.h
10
11**********************************************************************/
12
13#pragma once
14
15#include <memory>
16#include <vector>
17
18#include "Import.h"
19#include "SampleFormat.h"
20#include "Internat.h"
21#include "Track.h"
22
23class wxString;
24
25class TrackList;
27class WaveTrack;
28class WaveChannel;
29
30class IMPORT_EXPORT_API ImportUtils final
31{
32public:
33
35 static sampleFormat ChooseFormat(sampleFormat effectiveFormat);
36
39 static std::shared_ptr<WaveTrack>
40 NewWaveTrack(WaveTrackFactory &trackFactory, unsigned nChannels,
41 sampleFormat effectiveFormat, double rate);
42
43 static void ShowMessageBox(const TranslatableString& message, const TranslatableString& caption = XO("Import Project"));
44
46 static
47 void ForEachChannel(TrackList& trackList, const std::function<void(WaveChannel&)>& op);
48
50 static
51 void ForEachChannel(WaveTrack &track, const std::function<void(WaveChannel&)>& op);
52
54 static
55 void FinalizeImport(TrackHolders& outTracks,
56 const std::vector<std::shared_ptr<WaveTrack>>& importedStreams);
57
60 static
61 void FinalizeImport(TrackHolders& outTracks, TrackList &&trackList);
62
64 static
65 void FinalizeImport(TrackHolders& outTracks, WaveTrack &track);
66};
XO("Cut/Copy/Paste")
std::vector< std::shared_ptr< Track > > TrackHolders
Definition: ImportRaw.h:24
sampleFormat
The ordering of these values with operator < agrees with the order of increasing bit width.
Definition: SampleFormat.h:30
declares abstract base class Track, TrackList, and iterators over TrackList
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list o...
Definition: Track.h:850
Holds a msgid for the translation catalog; may also bind format arguments.
Used to create or clone a WaveTrack, with appropriate context from the project that will own the trac...
Definition: WaveTrack.h:870
A Track that contains audio waveform data.
Definition: WaveTrack.h:203
MessageBoxResult ShowMessageBox(const TranslatableString &message, MessageBoxOptions options={})
Show a modal message box with either Ok or Yes and No, and optionally Cancel.
Definition: BasicUI.h:279