Skip to content

Commit

Permalink
Merge pull request #14024 from ronso0/waveform-scratch-seek-fix
Browse files Browse the repository at this point in the history
(fix) allow seeking (eg. to hotcue) while scratching with the waveform
  • Loading branch information
daschuer authored Dec 17, 2024
2 parents 23f1b3b + 4965d2b commit a5b51ce
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/engine/controls/ratecontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -628,3 +628,7 @@ void RateControl::notifyWrapAround(mixxx::audio::FramePos triggerPos,
m_jumpPos = triggerPos;
m_targetPos = targetPos;
}

void RateControl::notifySeek(mixxx::audio::FramePos position) {
m_pScratchController->notifySeek(position);
}
1 change: 1 addition & 0 deletions src/engine/controls/ratecontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public slots:
void slotControlRatePermUpSmall(double);
void slotControlFastForward(double);
void slotControlFastBack(double);
void notifySeek(mixxx::audio::FramePos position) override;

private:
void processTempRate(const int bufferSamples);
Expand Down
4 changes: 2 additions & 2 deletions src/engine/positionscratchcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ double PositionScratchController::getRate() {

void PositionScratchController::notifySeek(mixxx::audio::FramePos position) {
DEBUG_ASSERT(position.isValid());
// scratching continues after seek due to calculating the relative distance traveled
// in m_samplePosDeltaSum
// Scratching continues after seek due to calculating the relative
// distance traveled in m_samplePosDeltaSum
m_prevSamplePos = position.toEngineSamplePos();
}

0 comments on commit a5b51ce

Please sign in to comment.