Skip to content

Commit

Permalink
Merge pull request #4217 from Holzhaus/enginebuffer-framepos
Browse files Browse the repository at this point in the history
EngineBuffer: Use mixxx::audio::FramePos
  • Loading branch information
uklotzde authored Sep 8, 2021
2 parents e405c47 + bc616cc commit a0ff12b
Show file tree
Hide file tree
Showing 7 changed files with 131 additions and 115 deletions.
6 changes: 2 additions & 4 deletions src/engine/controls/bpmcontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -723,8 +723,7 @@ mixxx::audio::FramePos BpmControl::getNearestPositionInPhase(
return thisPosition;
}

const auto otherPosition = mixxx::audio::FramePos::fromEngineSamplePos(
pOtherEngineBuffer->getExactPlayPos());
const auto otherPosition = pOtherEngineBuffer->getExactPlayPos();
if (!BpmControl::getBeatContext(otherBeats,
otherPosition,
nullptr,
Expand Down Expand Up @@ -909,8 +908,7 @@ mixxx::audio::FramePos BpmControl::getBeatMatchPosition(
return thisPosition;
}

const auto otherPosition = mixxx::audio::FramePos::fromEngineSamplePos(
pOtherEngineBuffer->getExactPlayPos());
const auto otherPosition = pOtherEngineBuffer->getExactPlayPos();
const mixxx::audio::SampleRate thisSampleRate = m_pBeats->getSampleRate();

// Seek our next beat to the other next beat near our beat.
Expand Down
4 changes: 2 additions & 2 deletions src/engine/controls/enginecontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ void EngineControl::setLoop(mixxx::audio::FramePos startPosition,

void EngineControl::seekAbs(mixxx::audio::FramePos position) {
if (m_pEngineBuffer) {
m_pEngineBuffer->slotControlSeekAbs(position.toEngineSamplePos());
m_pEngineBuffer->seekAbs(position);
}
}

void EngineControl::seekExact(mixxx::audio::FramePos position) {
if (m_pEngineBuffer) {
m_pEngineBuffer->slotControlSeekExact(position.toEngineSamplePos());
m_pEngineBuffer->seekExact(position);
}
}

Expand Down
Loading

0 comments on commit a0ff12b

Please sign in to comment.