Skip to content

Commit

Permalink
Looping: setting a manual updates beatloop_size so halve/double works
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Jan 5, 2024
1 parent f7bcc28 commit da73fec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/engine/controls/loopingcontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,9 @@ void LoopingControl::slotLoopOut(double pressed) {
if (pressed > 0.0) {
setLoopOutToCurrentPosition();
m_bLoopOutPressedWhileLoopDisabled = true;
// This updates m_pCOBeatLoopSize
LoopInfo loopInfo = m_loopInfo.getValue();
setLoop(loopInfo.startPosition, loopInfo.endPosition, m_bLoopingEnabled);
}
m_bAdjustingLoopOut = false;
}
Expand Down
6 changes: 3 additions & 3 deletions src/test/looping_control_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ TEST_F(LoopingControlTest, LoopDoubleButton_DoublesBeatloopSize) {
EXPECT_EQ(32.0, m_pBeatLoopSize->get());
}

TEST_F(LoopingControlTest, LoopDoubleButton_DoesNotResizeManualLoop) {
TEST_F(LoopingControlTest, DISABLED_LoopDoubleButton_DoesNotResizeManualLoop) {
setCurrentPosition(mixxx::audio::FramePos{500});
m_pButtonLoopIn->set(1.0);
m_pButtonLoopIn->set(0.0);
Expand Down Expand Up @@ -538,7 +538,7 @@ TEST_F(LoopingControlTest, LoopHalveButton_HalvesBeatloopSize) {
EXPECT_EQ(32.0, m_pBeatLoopSize->get());
}

TEST_F(LoopingControlTest, LoopHalveButton_DoesNotResizeManualLoop) {
TEST_F(LoopingControlTest, DISABLED_LoopHalveButton_DoesNotResizeManualLoop) {
setCurrentPosition(mixxx::audio::FramePos{500});
m_pButtonLoopIn->set(1.0);
m_pButtonLoopIn->set(0.0);
Expand Down Expand Up @@ -863,7 +863,7 @@ TEST_F(LoopingControlTest, BeatLoopSize_ValueChangeResizesBeatLoop) {
EXPECT_EQ(oldLoopLength * 2, newLoopLength);
}

TEST_F(LoopingControlTest, BeatLoopSize_ValueChangeDoesNotResizeManualLoop) {
TEST_F(LoopingControlTest, DISABLED_BeatLoopSize_ValueChangeDoesNotResizeManualLoop) {
setCurrentPosition(mixxx::audio::FramePos{50});
m_pTrack1->trySetBpm(160.0);
m_pQuantizeEnabled->set(0);
Expand Down

0 comments on commit da73fec

Please sign in to comment.