diff options
author | Nino Miškić-Pletenac <nino.mip@gmail.com> | 2019-03-27 02:50:00 +0100 |
---|---|---|
committer | Nino Miškić-Pletenac <nino.mip@gmail.com> | 2019-03-27 02:50:00 +0100 |
commit | 65dc18eee31c8fea7c40cd5afcda91325003012b (patch) | |
tree | a60dc41d762a6ecdb6d0ee3cb76b9baca1169b43 /src/track/cue.cpp | |
parent | 7a7e3e51d114929da5a189f39e2fc9e96960e6e5 (diff) |
CueControl: Fix computation of end position for intro/outro cues
Diffstat (limited to 'src/track/cue.cpp')
-rw-r--r-- | src/track/cue.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/track/cue.cpp b/src/track/cue.cpp index 347458ae06..0376b80854 100644 --- a/src/track/cue.cpp +++ b/src/track/cue.cpp @@ -176,6 +176,17 @@ void Cue::setDirty(bool dirty) { m_bDirty = dirty; } +double Cue::getEndPosition() const { + QMutexLocker lock(&m_mutex); + if (m_samplePosition == -1.0) { + return m_length; + } else if (m_length == 0.0) { + return -1.0; + } else { + return m_samplePosition + m_length; + } +} + bool operator==(const CuePosition& lhs, const CuePosition& rhs) { return lhs.getPosition() == rhs.getPosition() && lhs.getSource() == rhs.getSource(); |