Skip to content

Commit

Permalink
Fix a couple of spots where seek destination was unchecked for evenness
Browse files Browse the repository at this point in the history
  • Loading branch information
ywwg committed Mar 19, 2015
1 parent 8a37777 commit 160364a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/engine/enginebuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,9 @@ void EngineBuffer::processSlip(int iBufferSize) {
m_dSlipRate = m_rate_old;
} else {
// TODO(owen) assuming that looping will get canceled properly
slotControlSeekExact(m_dSlipPosition);
double newPlayFrame = m_dSlipPosition / kSamplesPerFrame;
double roundedSlip = round(newPlayFrame) * kSamplesPerFrame;
slotControlSeekExact(roundedSlip);
m_dSlipPosition = 0;
}
}
Expand Down Expand Up @@ -1154,9 +1156,12 @@ void EngineBuffer::processSeek() {
switch (seekType) {
case NO_SEEK:
return;
case SEEK_EXACT:
case SEEK_EXACT: {
double newPlayFrame = position / kSamplesPerFrame;
position = round(newPlayFrame) * kSamplesPerFrame;
setNewPlaypos(position);
break;
}
case SEEK_STANDARD: {
bool paused = m_playButton->get() == 0.0;
// If we are playing and quantize is on, match phase when seeking.
Expand Down

0 comments on commit 160364a

Please sign in to comment.