summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/analyzer/analyzersilence.cpp6
-rw-r--r--src/engine/controls/cuecontrol.cpp26
-rw-r--r--src/mixer/basetrackplayer.cpp2
-rw-r--r--src/test/analyzersilence_test.cpp4
-rw-r--r--src/test/cuecontrol_test.cpp26
-rw-r--r--src/track/cue.cpp2
-rw-r--r--src/track/cue.h2
-rw-r--r--src/track/track.cpp2
8 files changed, 35 insertions, 35 deletions
diff --git a/src/analyzer/analyzersilence.cpp b/src/analyzer/analyzersilence.cpp
index 3947e8b542..0f8850786a 100644
--- a/src/analyzer/analyzersilence.cpp
+++ b/src/analyzer/analyzersilence.cpp
@@ -98,7 +98,7 @@ void AnalyzerSilence::storeResults(TrackPointer pTrack) {
if (pAudibleSound == nullptr) {
pAudibleSound = pTrack->createAndAddCue();
pAudibleSound->setType(Cue::Type::AudibleSound);
- pAudibleSound->setPosition(firstSound);
+ pAudibleSound->setStartPosition(firstSound);
pAudibleSound->setLength(lastSound - firstSound);
}
@@ -123,7 +123,7 @@ void AnalyzerSilence::storeResults(TrackPointer pTrack) {
if (!pIntroCue) {
pIntroCue = pTrack->createAndAddCue();
pIntroCue->setType(Cue::Type::Intro);
- pIntroCue->setPosition(introStart);
+ pIntroCue->setStartPosition(introStart);
pIntroCue->setLength(0.0);
}
@@ -131,7 +131,7 @@ void AnalyzerSilence::storeResults(TrackPointer pTrack) {
if (!pOutroCue) {
pOutroCue = pTrack->createAndAddCue();
pOutroCue->setType(Cue::Type::Outro);
- pOutroCue->setPosition(kCueNotSet);
+ pOutroCue->setStartPosition(kCueNotSet);
pOutroCue->setLength(lastSound);
}
}
diff --git a/src/engine/controls/cuecontrol.cpp b/src/engine/controls/cuecontrol.cpp
index d809813a91..afd7769191 100644
--- a/src/engine/controls/cuecontrol.cpp
+++ b/src/engine/controls/cuecontrol.cpp
@@ -361,7 +361,7 @@ void CueControl::trackLoaded(TrackPointer pNewTrack) {
mainCuePoint = pNewTrack->getCuePoint();
// Than add the load cue to the list of cue
CuePointer pCue(pNewTrack->createAndAddCue());
- pCue->setPosition(mainCuePoint.getPosition());
+ pCue->setStartPosition(mainCuePoint.getPosition());
pCue->setHotCue(-1);
pCue->setType(Cue::Type::MainCue);
}
@@ -577,7 +577,7 @@ void CueControl::hotcueSet(HotcueControl* pControl, double v) {
double cuePosition =
(m_pQuantizeEnabled->toBool() && closestBeat != -1) ?
closestBeat : getSampleOfTrack().current;
- pCue->setPosition(cuePosition);
+ pCue->setStartPosition(cuePosition);
pCue->setHotCue(hotcue);
pCue->setLabel("");
pCue->setType(Cue::Type::HotCue);
@@ -788,7 +788,7 @@ void CueControl::hotcuePositionChanged(HotcueControl* pControl, double newPositi
if (newPosition == -1) {
detachCue(pControl);
} else if (newPosition > 0 && newPosition < m_pTrackSamples->get()) {
- pCue->setPosition(newPosition);
+ pCue->setStartPosition(newPosition);
}
}
}
@@ -1150,7 +1150,7 @@ void CueControl::introStartSet(double v) {
pCue = pLoadedTrack->createAndAddCue();
pCue->setType(Cue::Type::Intro);
}
- pCue->setPosition(position);
+ pCue->setStartPosition(position);
pCue->setLength(introEnd != -1.0 ? introEnd - position : 0.0);
}
}
@@ -1168,7 +1168,7 @@ void CueControl::introStartClear(double v) {
if (pLoadedTrack) {
CuePointer pCue = pLoadedTrack->findCueByType(Cue::Type::Intro);
if (introEnd != -1.0) {
- pCue->setPosition(-1.0);
+ pCue->setStartPosition(-1.0);
pCue->setLength(introEnd);
} else if (pCue) {
pLoadedTrack->removeCue(pCue);
@@ -1229,10 +1229,10 @@ void CueControl::introEndSet(double v) {
pCue->setType(Cue::Type::Intro);
}
if (introStart != -1.0) {
- pCue->setPosition(introStart);
+ pCue->setStartPosition(introStart);
pCue->setLength(position - introStart);
} else {
- pCue->setPosition(-1.0);
+ pCue->setStartPosition(-1.0);
pCue->setLength(position);
}
}
@@ -1251,7 +1251,7 @@ void CueControl::introEndClear(double v) {
if (pLoadedTrack) {
CuePointer pCue = pLoadedTrack->findCueByType(Cue::Type::Intro);
if (introStart != -1.0) {
- pCue->setPosition(introStart);
+ pCue->setStartPosition(introStart);
pCue->setLength(0.0);
} else if (pCue) {
pLoadedTrack->removeCue(pCue);
@@ -1311,7 +1311,7 @@ void CueControl::outroStartSet(double v) {
pCue = pLoadedTrack->createAndAddCue();
pCue->setType(Cue::Type::Outro);
}
- pCue->setPosition(position);
+ pCue->setStartPosition(position);
pCue->setLength(outroEnd != -1.0 ? outroEnd - position : 0.0);
}
}
@@ -1329,7 +1329,7 @@ void CueControl::outroStartClear(double v) {
if (pLoadedTrack) {
CuePointer pCue = pLoadedTrack->findCueByType(Cue::Type::Outro);
if (outroEnd != -1.0) {
- pCue->setPosition(-1.0);
+ pCue->setStartPosition(-1.0);
pCue->setLength(outroEnd);
} else if (pCue) {
pLoadedTrack->removeCue(pCue);
@@ -1390,10 +1390,10 @@ void CueControl::outroEndSet(double v) {
pCue->setType(Cue::Type::Outro);
}
if (outroStart != -1.0) {
- pCue->setPosition(outroStart);
+ pCue->setStartPosition(outroStart);
pCue->setLength(position - outroStart);
} else {
- pCue->setPosition(-1.0);
+ pCue->setStartPosition(-1.0);
pCue->setLength(position);
}
}
@@ -1412,7 +1412,7 @@ void CueControl::outroEndClear(double v) {
if (pLoadedTrack) {
CuePointer pCue = pLoadedTrack->findCueByType(Cue::Type::Outro);
if (outroStart != -1.0) {
- pCue->setPosition(outroStart);
+ pCue->setStartPosition(outroStart);
pCue->setLength(0.0);
} else if (pCue) {
pLoadedTrack->removeCue(pCue);
diff --git a/src/mixer/basetrackplayer.cpp b/src/mixer/basetrackplayer.cpp
index bb946899f8..8e55acd58b 100644
--- a/src/mixer/basetrackplayer.cpp
+++ b/src/mixer/basetrackplayer.cpp
@@ -228,7 +228,7 @@ TrackPointer BaseTrackPlayerImpl::unloadTrack() {
pLoopCue = m_pLoadedTrack->createAndAddCue();
pLoopCue->setType(Cue::Type::Loop);
}
- pLoopCue->setPosition(loopStart);
+ pLoopCue->setStartPosition(loopStart);
pLoopCue->setLength(loopEnd - loopStart);
}
diff --git a/src/test/analyzersilence_test.cpp b/src/test/analyzersilence_test.cpp
index 265c57fad8..1c877e4e72 100644
--- a/src/test/analyzersilence_test.cpp
+++ b/src/test/analyzersilence_test.cpp
@@ -168,12 +168,12 @@ TEST_F(AnalyzerSilenceTest, RespectUserEdits) {
CuePointer pIntroCue = pTrack->createAndAddCue();
pIntroCue->setType(Cue::Type::Intro);
- pIntroCue->setPosition(kManualIntroPosition);
+ pIntroCue->setStartPosition(kManualIntroPosition);
pIntroCue->setLength(0.0);
CuePointer pOutroCue = pTrack->createAndAddCue();
pOutroCue->setType(Cue::Type::Outro);
- pOutroCue->setPosition(-1.0);
+ pOutroCue->setStartPosition(-1.0);
pOutroCue->setLength(kManualOutroPosition);
// Fill the first half with silence
diff --git a/src/test/cuecontrol_test.cpp b/src/test/cuecontrol_test.cpp
index c3e8bb882b..50ee9e753f 100644
--- a/src/test/cuecontrol_test.cpp
+++ b/src/test/cuecontrol_test.cpp
@@ -78,11 +78,11 @@ TEST_F(CueControlTest, LoadUnloadTrack) {
pTrack->setCuePoint(CuePosition(100.0));
auto pIntro = pTrack->createAndAddCue();
pIntro->setType(Cue::Type::Intro);
- pIntro->setPosition(150.0);
+ pIntro->setStartPosition(150.0);
pIntro->setLength(50.0);
auto pOutro = pTrack->createAndAddCue();
pOutro->setType(Cue::Type::Outro);
- pOutro->setPosition(250.0);
+ pOutro->setStartPosition(250.0);
pOutro->setLength(50.0);
loadTrack(pTrack);
@@ -115,11 +115,11 @@ TEST_F(CueControlTest, LoadTrackWithDetectedCues) {
pTrack->setCuePoint(CuePosition(100.0));
auto pIntro = pTrack->createAndAddCue();
pIntro->setType(Cue::Type::Intro);
- pIntro->setPosition(100.0);
+ pIntro->setStartPosition(100.0);
pIntro->setLength(0.0);
auto pOutro = pTrack->createAndAddCue();
pOutro->setType(Cue::Type::Outro);
- pOutro->setPosition(-1.0);
+ pOutro->setStartPosition(-1.0);
pOutro->setLength(200.0);
loadTrack(pTrack);
@@ -139,11 +139,11 @@ TEST_F(CueControlTest, LoadTrackWithIntroEndAndOutroStart) {
TrackPointer pTrack = createTestTrack();
auto pIntro = pTrack->createAndAddCue();
pIntro->setType(Cue::Type::Intro);
- pIntro->setPosition(-1.0);
+ pIntro->setStartPosition(-1.0);
pIntro->setLength(150.0);
auto pOutro = pTrack->createAndAddCue();
pOutro->setType(Cue::Type::Outro);
- pOutro->setPosition(250.0);
+ pOutro->setStartPosition(250.0);
pOutro->setLength(0.0);
loadTrack(pTrack);
@@ -175,12 +175,12 @@ TEST_F(CueControlTest, LoadAutodetectedCues_QuantizeEnabled) {
auto pIntro = pTrack->createAndAddCue();
pIntro->setType(Cue::Type::Intro);
- pIntro->setPosition(2.1 * beatLength);
+ pIntro->setStartPosition(2.1 * beatLength);
pIntro->setLength(1.2 * beatLength);
auto pOutro = pTrack->createAndAddCue();
pOutro->setType(Cue::Type::Outro);
- pOutro->setPosition(11.1 * beatLength);
+ pOutro->setStartPosition(11.1 * beatLength);
pOutro->setLength(4.4 * beatLength);
loadTrack(pTrack);
@@ -203,12 +203,12 @@ TEST_F(CueControlTest, LoadAutodetectedCues_QuantizeEnabledNoBeats) {
auto pIntro = pTrack->createAndAddCue();
pIntro->setType(Cue::Type::Intro);
- pIntro->setPosition(250.0);
+ pIntro->setStartPosition(250.0);
pIntro->setLength(150.0);
auto pOutro = pTrack->createAndAddCue();
pOutro->setType(Cue::Type::Outro);
- pOutro->setPosition(550.0);
+ pOutro->setStartPosition(550.0);
pOutro->setLength(250.0);
loadTrack(pTrack);
@@ -231,12 +231,12 @@ TEST_F(CueControlTest, LoadAutodetectedCues_QuantizeDisabled) {
auto pIntro = pTrack->createAndAddCue();
pIntro->setType(Cue::Type::Intro);
- pIntro->setPosition(210.0);
+ pIntro->setStartPosition(210.0);
pIntro->setLength(120.0);
auto pOutro = pTrack->createAndAddCue();
pOutro->setType(Cue::Type::Outro);
- pOutro->setPosition(770.0);
+ pOutro->setStartPosition(770.0);
pOutro->setLength(220.0);
loadTrack(pTrack);
@@ -253,7 +253,7 @@ TEST_F(CueControlTest, SeekOnLoadDefault) {
TrackPointer pTrack = createTestTrack();
auto pIntro = pTrack->createAndAddCue();
pIntro->setType(Cue::Type::Intro);
- pIntro->setPosition(250.0);
+ pIntro->setStartPosition(250.0);
pIntro->setLength(150.0);
loadTrack(pTrack);
diff --git a/src/track/cue.cpp b/src/track/cue.cpp
index dec0d8f1c4..85ddeb144b 100644
--- a/src/track/cue.cpp
+++ b/src/track/cue.cpp
@@ -90,7 +90,7 @@ double Cue::getPosition() const {
return m_samplePosition;
}
-void Cue::setPosition(double samplePosition) {
+void Cue::setStartPosition(double samplePosition) {
QMutexLocker lock(&m_mutex);
m_samplePosition = samplePosition;
m_bDirty = true;
diff --git a/src/track/cue.h b/src/track/cue.h
index 2fa33aaa6b..83f00f9678 100644
--- a/src/track/cue.h
+++ b/src/track/cue.h
@@ -40,7 +40,7 @@ class Cue : public QObject {
void setType(Cue::Type type);
double getPosition() const;
- void setPosition(double samplePosition);
+ void setStartPosition(double samplePosition);
double getLength() const;
void setLength(double length);
diff --git a/src/track/track.cpp b/src/track/track.cpp
index ae3026cb40..06e2e06dd1 100644
--- a/src/track/track.cpp
+++ b/src/track/track.cpp
@@ -665,7 +665,7 @@ void Track::setCuePoint(CuePosition cue) {
&Track::slotCueUpdated);
m_cuePoints.push_back(pLoadCue);
}
- pLoadCue->setPosition(position);
+ pLoadCue->setStartPosition(position);
} else if (pLoadCue) {
disconnect(pLoadCue.get(), 0, this, 0);
m_cuePoints.removeOne(pLoadCue);