Audacity 3.2.0
WaveTrackLocation.h
Go to the documentation of this file.
1/**********************************************************************
2
3Audacity: A Digital Audio Editor
4
5@file WaveTrackLocation.h
6@brief finds clip and cutline boundaries attached to WaveTrack
7
8Paul Licameli -- split from WaveTrack.h
9
10**********************************************************************/
11
12#ifndef __AUDACITY_WAVE_TRACK_LOCATION__
13#define __AUDACITY_WAVE_TRACK_LOCATION__
14
15#include <vector>
16
17class WaveTrack;
18
20
21 WaveTrackLocation() = default;
22
23 WaveTrackLocation(double pos, int clipidx1 = -1, int clipidx2 = -1)
24 : pos { pos }
25 , clipidx1 { clipidx1 }
26 , clipidx2 { clipidx2 }
27 {}
28
29 // Position of track location
30 double pos{ 0.0 };
31
32 // Only for typ==locationMergePoint
33 int clipidx1{ -1 }; // first clip (left one)
34 int clipidx2{ -1 }; // second clip (right one)
35};
36
37inline
39{
40 return a.pos == b.pos &&
41 a.clipidx1 == b.clipidx1 &&
42 a.clipidx2 == b.clipidx2;
43}
44
45inline
47{
48 return !( a == b );
49}
50
51using WaveTrackLocations = std::vector<WaveTrackLocation>;
52
53AUDACITY_DLL_API
55
56#endif
bool operator==(const WaveTrackLocation &a, const WaveTrackLocation &b)
AUDACITY_DLL_API WaveTrackLocations FindWaveTrackLocations(const WaveTrack &track)
bool operator!=(const WaveTrackLocation &a, const WaveTrackLocation &b)
std::vector< WaveTrackLocation > WaveTrackLocations
A Track that contains audio waveform data.
Definition: WaveTrack.h:203
WaveTrackLocation()=default
WaveTrackLocation(double pos, int clipidx1=-1, int clipidx2=-1)