Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 3 additions & 15 deletions src/engine/controls/cuecontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,12 +472,6 @@ void CueControl::attachCue(const CuePointer& pCue, HotcueControl* pControl) {
return;
}
detachCue(pControl);
connect(pCue.get(),
&Cue::updated,
this,
&CueControl::cueUpdated,
Qt::DirectConnection);

pControl->setCue(pCue);
}

Expand All @@ -491,7 +485,6 @@ void CueControl::detachCue(HotcueControl* pControl) {
return;
}

disconnect(pCue.get(), nullptr, this, nullptr);
m_pCurrentSavedLoopControl.testAndSetRelease(pControl, nullptr);
pControl->resetCue();
}
Expand Down Expand Up @@ -640,11 +633,6 @@ void CueControl::slotCueModeChanged(double) {
}
}

void CueControl::cueUpdated() {
//auto lock = lockMutex(&m_mutex);
// We should get a trackCuesUpdated call anyway, so do nothing.
}

void CueControl::loadCuesFromTrack() {
auto lock = lockMutex(&m_trackMutex);
if (!m_pLoadedTrack) {
Expand Down Expand Up @@ -983,15 +971,15 @@ void CueControl::hotcueSet(HotcueControl* pControl, double value, HotcueSetMode
}
}

CuePointer pCue = m_pLoadedTrack->createAndAddCue(
m_pLoadedTrack->createAndAddCue(
cueType,
hotcueIndex,
cueStartPosition,
cueEndPosition,
color);

// TODO(XXX) deal with spurious signals
attachCue(pCue, pControl);
// Note: createAndAddCue() emits cuesUpdated() connected to loadCuesFromTrack()
// updating pControl with the created Cue.

if (cueType == mixxx::CueType::Loop) {
setCurrentSavedLoopControlAndActivate(pControl);
Expand Down
1 change: 0 additions & 1 deletion src/engine/controls/cuecontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ class CueControl : public EngineControl {
void quantizeChanged(double v);
void slotCueModeChanged(double v);

void cueUpdated();
void trackAnalyzed();
void trackCuesUpdated();
void hotcueSet(HotcueControl* pControl, double v, HotcueSetMode mode);
Expand Down
20 changes: 10 additions & 10 deletions src/track/track.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -945,12 +945,12 @@ void Track::setMainCuePosition(mixxx::audio::FramePos position) {
}

// Store the cue point as main cue
CuePointer pLoadCue = findCueByType(mixxx::CueType::MainCue);
CuePointer pMainCue = findCueByType(mixxx::CueType::MainCue);
if (position.isValid()) {
if (pLoadCue) {
pLoadCue->setStartPosition(position);
if (pMainCue) {
pMainCue->setStartPosition(position);
} else {
pLoadCue = CuePointer(new Cue(
pMainCue = CuePointer(new Cue(
mixxx::CueType::MainCue,
Cue::kNoHotCue,
position,
Expand All @@ -959,16 +959,16 @@ void Track::setMainCuePosition(mixxx::audio::FramePos position) {
// While this method could be called from any thread,
// associated Cue objects should always live on the
// same thread as their host, namely this->thread().
pLoadCue->moveToThread(thread());
connect(pLoadCue.get(),
pMainCue->moveToThread(thread());
connect(pMainCue.get(),
&Cue::updated,
this,
&Track::slotCueUpdated);
m_cuePoints.push_back(pLoadCue);
m_cuePoints.push_back(pMainCue);
}
} else if (pLoadCue) {
disconnect(pLoadCue.get(), nullptr, this, nullptr);
m_cuePoints.removeOne(pLoadCue);
} else if (pMainCue) {
disconnect(pMainCue.get(), nullptr, this, nullptr);
m_cuePoints.removeOne(pMainCue);
}

markDirtyAndUnlock(&locked);
Expand Down
Loading