Skip to content

Commit

Permalink
Sync Lock: Remove unneeded end-of-track code
Browse files Browse the repository at this point in the history
  • Loading branch information
ywwg committed Mar 15, 2021
1 parent fe05e22 commit 77cd3f7
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
6 changes: 0 additions & 6 deletions src/engine/enginebuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1335,12 +1335,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
9 changes: 0 additions & 9 deletions src/engine/sync/synccontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,15 +330,6 @@ void SyncControl::setInstantaneousBpm(double bpm) {
m_pBpmControl->setInstantaneousBpm(bpm * m_masterBpmAdjustFactor);
}

void SyncControl::reportTrackPosition(double fractionalPlaypos) {
// If we're close to the end, and master, disable master so we don't stop
// the party.
if (isMaster(getSyncMode()) &&
fractionalPlaypos > kTrackPositionMasterHandoff) {
m_pChannel->getEngineBuffer()->requestSyncMode(SYNC_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 @@ -59,7 +59,6 @@ class SyncControl : public EngineControl, public Syncable {

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

void reportTrackPosition(double fractionalPlaypos);
void reportPlayerSpeed(double speed, bool scratching);
void notifySeek(double dNewPlaypos) override;
void trackLoaded(TrackPointer pNewTrack) override;
Expand Down

0 comments on commit 77cd3f7

Please sign in to comment.