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 TrackListHolder NewWaveTrack(WaveTrackFactory &trackFactory, unsigned nChannels,
40 sampleFormat effectiveFormat, double rate);
41
42 static void ShowMessageBox(const TranslatableString& message, const TranslatableString& caption = XO("Import Project"));
43
45 static
46 void ForEachChannel(TrackList& trackList, const std::function<void(WaveChannel&)>& op);
47
49 static
50 void FinalizeImport(TrackHolders& outTracks, const std::vector<TrackListHolder>& importedStreams);
51
53 static
54 void FinalizeImport(TrackHolders& outTracks, TrackListHolder trackList);
55};
XO("Cut/Copy/Paste")
std::vector< std::shared_ptr< TrackList > > 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
std::shared_ptr< TrackList > TrackListHolder
Definition: Track.h:42
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list o...
Definition: Track.h:993
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:1279
A Track that contains audio waveform data.
Definition: WaveTrack.h:227
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:277