Audacity 3.2.0
PasteOverPreservingClips.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 PasteOverPreservingClips.h
6
7 Mitch Golden
8 Vaughan Johnson
9
10 Paul Licameli split from Equalization.h
11
12***********************************************************************/
13#ifndef __AUDACITY_PASTE_OVER_PRESERVING_CLIPS__
14#define __AUDACITY_PASTE_OVER_PRESERVING_CLIPS__
15
16#include <vector>
17
18class sampleCount;
19class WaveTrack;
20class wxString;
21
22using Gap = std::pair<double, double>;
23using Gaps = std::vector<Gap>;
24
25struct ClipData {
26 //Find the bits of clips that need replacing
28 //may be truncated due to a clip being partially selected
30 //Used to restore clip names after pasting
31 std::vector<wxString> clipNames;
32};
33
34
36
41WAVE_TRACK_API ClipData CollectClipData(
42 const WaveTrack &oldTrack, sampleCount start, sampleCount len);
43
45
53WAVE_TRACK_API void PasteOverPreservingClips(const ClipData &data,
54 WaveTrack &oldTrack, sampleCount start, sampleCount len,
55 const WaveTrack &newContents);
56
57#endif
WAVE_TRACK_API void PasteOverPreservingClips(const ClipData &data, WaveTrack &oldTrack, sampleCount start, sampleCount len, const WaveTrack &newContents)
Substitute new contents into existing track, preserving clip boundaries.
WAVE_TRACK_API ClipData CollectClipData(const WaveTrack &oldTrack, sampleCount start, sampleCount len)
Collect clip boundary and name information.
std::vector< Gap > Gaps
std::pair< double, double > Gap
A Track that contains audio waveform data.
Definition: WaveTrack.h:220
Positions or offsets within audio files need a wide type.
Definition: SampleCount.h:19
std::vector< wxString > clipNames