forked from Sneeds-Feed-and-Seed/sneedacity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWaveTrackLocation.h
54 lines (40 loc) · 1.17 KB
/
WaveTrackLocation.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/**********************************************************************
Sneedacity: A Digital Audio Editor
WaveTrackLocation.h
Paul Licameli -- split from WaveTrack.h
**********************************************************************/
#ifndef __SNEEDACITY_WAVE_TRACK_LOCATION__
#define __SNEEDACITY_WAVE_TRACK_LOCATION__
struct WaveTrackLocation {
enum LocationType {
locationCutLine = 1,
locationMergePoint
};
explicit
WaveTrackLocation
(double pos_ = 0.0, LocationType typ_ = locationCutLine,
int clipidx1_ = -1, int clipidx2_ = -1)
: pos(pos_), typ(typ_), clipidx1(clipidx1_), clipidx2(clipidx2_)
{}
// Position of track location
double pos;
// Type of track location
LocationType typ;
// Only for typ==locationMergePoint
int clipidx1; // first clip (left one)
int clipidx2; // second clip (right one)
};
inline
bool operator == (const WaveTrackLocation &a, const WaveTrackLocation &b)
{
return a.pos == b.pos &&
a.typ == b.typ &&
a.clipidx1 == b.clipidx1 &&
a.clipidx2 == b.clipidx2;
}
inline
bool operator != (const WaveTrackLocation &a, const WaveTrackLocation &b)
{
return !( a == b );
}
#endif