Skip to content

Commit

Permalink
Merge pull request #11035 from ywwg/sync-end-of-track
Browse files Browse the repository at this point in the history
I can confirm that this fixes the bug with the GUI slowdown. If we decide, that we want another Sync behaviour on track end, we can address it in a follow-up PR.
  • Loading branch information
JoergAtGithub authored Feb 10, 2023
2 parents dfd8823 + 3221f8d commit 8727cfc
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 15 deletions.
6 changes: 0 additions & 6 deletions src/engine/enginebuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1382,12 +1382,6 @@ void EngineBuffer::updateIndicators(double speed, int iBufferSize) {
speed = 0;
}

// Report fractional playpos to SyncControl.
// TODO(rryan) It's kind of hacky that this is in updateIndicators but it
// prevents us from computing fFractionalPlaypos multiple times per
// EngineBuffer::process().
m_pSyncControl->reportTrackPosition(fFractionalPlaypos);

// Update indicators that are only updated after every
// sampleRate/kiUpdateRate samples processed. (e.g. playposSlider)
if (m_iSamplesSinceLastIndicatorUpdate >
Expand Down
8 changes: 0 additions & 8 deletions src/engine/sync/synccontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,14 +360,6 @@ void SyncControl::updateInstantaneousBpm(mixxx::Bpm bpm) {
m_pBpmControl->updateInstantaneousBpm(bpmValue);
}

void SyncControl::reportTrackPosition(double fractionalPlaypos) {
// If we're close to the end, and leader, disable leader so we don't stop
// the party.
if (isLeader(getSyncMode()) && fractionalPlaypos >= 1.0) {
m_pChannel->getEngineBuffer()->requestSyncMode(SyncMode::Follower);
}
}

// called from an engine worker thread
void SyncControl::trackLoaded(TrackPointer pNewTrack) {
mixxx::BeatsPointer pBeats;
Expand Down
1 change: 0 additions & 1 deletion src/engine/sync/synccontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ class SyncControl : public EngineControl, public Syncable {

void setEngineControls(RateControl* pRateControl, BpmControl* pBpmControl);

void reportTrackPosition(double fractionalPlaypos);
void reportPlayerSpeed(double speed, bool scratching);
void trackLoaded(TrackPointer pNewTrack) override;
void trackBeatsUpdated(mixxx::BeatsPointer pBeats) override;
Expand Down

0 comments on commit 8727cfc

Please sign in to comment.