From 0783a13514f35e679059076c9cabed708baa844a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Tue, 22 May 2018 02:29:42 +0200 Subject: [PATCH 1/8] fix beatsync control syncing phase, an old regression since 2.0 --- src/engine/enginebuffer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engine/enginebuffer.cpp b/src/engine/enginebuffer.cpp index 1218f017b6..42087bc248 100644 --- a/src/engine/enginebuffer.cpp +++ b/src/engine/enginebuffer.cpp @@ -658,7 +658,7 @@ void EngineBuffer::slotControlPlayRequest(double v) { bool verifiedPlay = updateIndicatorsAndModifyPlay(v > 0.0); if (!oldPlay && verifiedPlay) { - if (m_pQuantize->get() > 0.0 + if (m_pQuantize->toBool() #ifdef __VINYLCONTROL__ && m_pVinylControlControl && !m_pVinylControlControl->isEnabled() #endif @@ -900,7 +900,7 @@ void EngineBuffer::process(CSAMPLE* pOutput, const int iBufferSize) { // we need to sync phase or we'll be totally out of whack and the sync // adjuster will kick in and push the track back in to sync with the // master. - if (m_scratching_old && !is_scratching && m_pQuantize->get() > 0.0 + if (m_scratching_old && !is_scratching && m_pQuantize->toBool() && m_pSyncControl->getSyncMode() == SYNC_FOLLOWER && !paused) { // TODO() The resulting seek is processed in the following callback // That is to late @@ -1179,7 +1179,7 @@ void EngineBuffer::processSeek(bool paused) { return; } - if ((seekType & SEEK_PHASE) && !paused && m_pQuantize->toBool()) { + if (!paused && ((seekType & SEEK_PHASE) || m_pQuantize->toBool())) { position = m_pBpmControl->getNearestPositionInPhase(position, true, true); } if (position != m_filepos_play) { From c65d450f9962ea834a55d6aec6749b2f7524cb90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Tue, 22 May 2018 02:37:31 +0200 Subject: [PATCH 2/8] Added beatsync to right click on sync in Shade and Deere, fixes bug #1772526 --- res/skins/Deere/deck_tempo_column.xml | 3 ++- res/skins/Shade/deck.xml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/res/skins/Deere/deck_tempo_column.xml b/res/skins/Deere/deck_tempo_column.xml index 7d7e76ea19..d7de70df24 100644 --- a/res/skins/Deere/deck_tempo_column.xml +++ b/res/skins/Deere/deck_tempo_column.xml @@ -15,7 +15,7 @@ TempoControlButtons vertical - diff --git a/res/skins/LateNight/deck.xml b/res/skins/LateNight/deck.xml index 245b7d6509..7791f9cabd 100644 --- a/res/skins/LateNight/deck.xml +++ b/res/skins/LateNight/deck.xml @@ -281,7 +281,7 @@ LeftButton - ,beatsync + ,beatsync_phase RightButton diff --git a/res/skins/Shade/deck.xml b/res/skins/Shade/deck.xml index 494901128a..368ab2c7c6 100644 --- a/res/skins/Shade/deck.xml +++ b/res/skins/Shade/deck.xml @@ -450,7 +450,7 @@ LeftButton - [Channel],beatsync + [Channel],beatsync_phase RightButton diff --git a/res/skins/Tango/rate_pitch_key.xml b/res/skins/Tango/rate_pitch_key.xml index 7af6103531..9da83e13fa 100644 --- a/res/skins/Tango/rate_pitch_key.xml +++ b/res/skins/Tango/rate_pitch_key.xml @@ -113,7 +113,7 @@ Variables: SyncButtonOverlay 50f,18min ,sync_enabled - ,rate_set_default + ,beatsync_phase BpmLabel From 55715f11b36b5616c114b1ff9a9174b34af36d4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Fri, 8 Jun 2018 18:04:40 +0200 Subject: [PATCH 8/8] fix typos --- src/engine/sync/synccontrol.cpp | 4 ++-- src/test/enginesynctest.cpp | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/engine/sync/synccontrol.cpp b/src/engine/sync/synccontrol.cpp index 89fded5706..dc98717b14 100644 --- a/src/engine/sync/synccontrol.cpp +++ b/src/engine/sync/synccontrol.cpp @@ -167,8 +167,8 @@ void SyncControl::requestSync() { if (isPlaying() && m_pQuantize->toBool()) { // only sync phase if the deck is playing and if quantize is enabled. // this way the it is up to the user to decide if a seek is desired or not. - // This is helpfull if the beatgrid of the track doe not fit at the current - // payposition + // This is helpful if the beatgrid of the track doe not fit at the current + // playposition m_pChannel->getEngineBuffer()->requestSyncPhase(); } } diff --git a/src/test/enginesynctest.cpp b/src/test/enginesynctest.cpp index dac5d6e5bc..ca5b6db8a5 100644 --- a/src/test/enginesynctest.cpp +++ b/src/test/enginesynctest.cpp @@ -1430,7 +1430,7 @@ TEST_F(EngineSyncTest, ZeroBpmNaturalRate) { ControlObject::getControl(ConfigKey(m_sGroup1, "local_bpm"))->get()); } -TEST_F(EngineSyncTest, SyncPhaseToIfQuantize) { +TEST_F(EngineSyncTest, QuantizeImpliesSyncPhase) { auto pButtonSyncEnabled1 = std::make_unique(m_sGroup1, "sync_enabled"); auto pButtonBeatsync1 = std::make_unique(m_sGroup1, "beatsync"); auto pButtonBeatsyncPhase1 = std::make_unique(m_sGroup1, "beatsync_phase"); @@ -1497,5 +1497,3 @@ TEST_F(EngineSyncTest, SyncPhaseToIfQuantize) { } - -