From abcd88e20a85591b2e74500eb5768a3461892dae Mon Sep 17 00:00:00 2001 From: davidlmorris Date: Sun, 1 Sep 2024 08:14:32 +0800 Subject: [PATCH 1/8] AutoDj Crossfader to the center Option to set the Crossfader to the center as AutoDj starts a crossfade so the track starts at full volume. --- src/library/autodj/autodjprocessor.cpp | 28 +++++++++++++++++----- src/library/autodj/autodjprocessor.h | 2 ++ src/preferences/dialog/dlgprefautodj.cpp | 8 +++++++ src/preferences/dialog/dlgprefautodjdlg.ui | 23 +++++++++++++++++- 4 files changed, 54 insertions(+), 7 deletions(-) diff --git a/src/library/autodj/autodjprocessor.cpp b/src/library/autodj/autodjprocessor.cpp index 165d2c6c4c9..74ed616c5eb 100644 --- a/src/library/autodj/autodjprocessor.cpp +++ b/src/library/autodj/autodjprocessor.cpp @@ -566,6 +566,8 @@ AutoDJProcessor::AutoDJError AutoDJProcessor::toggleAutoDJ(bool enable) { setCrossfader(1.0); } } + m_crossfaderStartCenter = m_pConfig->getValue(ConfigKey(kConfigKey, + QStringLiteral("center_xfader_when_starting_xfade"))); emitAutoDJStateChanged(m_eState); } else { // Disable Auto DJ m_pEnabledAutoDJ->setAndConfirm(0.0); @@ -832,6 +834,7 @@ void AutoDJProcessor::playerPositionChanged(DeckAttributes* pAttributes, double crossfaderTarget; if (m_eState == ADJ_LEFT_FADING) { crossfaderTarget = 1.0; + } else if (m_eState == ADJ_RIGHT_FADING) { crossfaderTarget = -1.0; } else { @@ -859,17 +862,29 @@ void AutoDJProcessor::playerPositionChanged(DeckAttributes* pAttributes, double transitionProgress = (thisPlayPosition - thisDeck->fadeBeginPos) / (thisDeck->fadeEndPos - thisDeck->fadeBeginPos); double transitionStep = transitionProgress - m_transitionProgress; + + if ((transitionProgress == 0.0) && + (m_crossfaderStartCenter)) + { + setCrossfader(0.0); // So we start at the mid point before we make any fader moves. + } if (transitionStep > 0.0) { // We have made progress. // Backward seeks pause the transitions; forward seeks speed up // the transitions. If there has been a seek beyond endPos, end // the transition immediately. - double remainingCrossfader = crossfaderTarget - currentCrossfader; - double adjustment = remainingCrossfader / - (1.0 - m_transitionProgress) * transitionStep; - // we move the crossfader linearly with - // movements in this track's play position. - setCrossfader(currentCrossfader + adjustment); + if ((m_crossfaderStartCenter) && + (transitionProgress <= ((thisDeck->fadeEndPos - thisDeck->fadeBeginPos)/2))) { + // We want the cross fader to remain in the middle. + setCrossfader(0.0); + } else { + double remainingCrossfader = crossfaderTarget - currentCrossfader; + double adjustment = remainingCrossfader / + (1.0 - m_transitionProgress) * transitionStep; + // we move the crossfader linearly with + // movements in this track's play position. + setCrossfader(currentCrossfader + adjustment); + } } m_transitionProgress = transitionProgress; // if we are at 1.0 here, we need an additional callback until the last @@ -1343,6 +1358,7 @@ void AutoDJProcessor::calculateTransition(DeckAttributes* pFromDeck, } switch (m_transitionMode) { +// case TransitionMode::RadioFullIntroOutro: case TransitionMode::FullIntroOutro: { // Use the outro or intro length for the transition time, whichever is // shorter. Let the full outro and intro play; do not cut off any part diff --git a/src/library/autodj/autodjprocessor.h b/src/library/autodj/autodjprocessor.h index 600cf7bfb70..9ef9a9a2178 100644 --- a/src/library/autodj/autodjprocessor.h +++ b/src/library/autodj/autodjprocessor.h @@ -285,9 +285,11 @@ class AutoDJProcessor : public QObject { double m_transitionProgress; double m_transitionTime; // the desired value set by the user TransitionMode m_transitionMode; + bool m_crossfaderStartCenter; QList m_decks; + ControlProxy* m_pCOCrossfader; ControlProxy* m_pCOCrossfaderReverse; diff --git a/src/preferences/dialog/dlgprefautodj.cpp b/src/preferences/dialog/dlgprefautodj.cpp index 69e5069698c..c296600221c 100644 --- a/src/preferences/dialog/dlgprefautodj.cpp +++ b/src/preferences/dialog/dlgprefautodj.cpp @@ -61,6 +61,10 @@ void DlgPrefAutoDJ::slotUpdate() { // Re-center the crossfader instantly when AutoDJ is disabled CenterXfaderCheckBox->setChecked(m_pConfig->getValue( ConfigKey("[Auto DJ]", "center_xfader_when_disabling"), false)); + + CrossfaderStartCenterCheckBox->setChecked(m_pConfig->getValue( + ConfigKey("[Auto DJ]", "center_xfader_when_starting_xfade"), false)); + } void DlgPrefAutoDJ::slotApply() { @@ -81,8 +85,11 @@ void DlgPrefAutoDJ::slotApply() { m_pConfig->setValue(ConfigKey("[Auto DJ]", "center_xfader_when_disabling"), CenterXfaderCheckBox->isChecked()); + m_pConfig->setValue(ConfigKey("[Auto DJ]", "center_xfader_when_starting_xfade"), + CrossfaderStartCenterCheckBox->isChecked()); } + void DlgPrefAutoDJ::slotResetToDefaults() { MinimumAvailableSpinBox->setValue(20); @@ -96,6 +103,7 @@ void DlgPrefAutoDJ::slotResetToDefaults() { RandomQueueMinimumSpinBox->setValue(5); CenterXfaderCheckBox->setChecked(false); + CrossfaderStartCenterCheckBox->setChecked(false); } void DlgPrefAutoDJ::slotToggleRequeueIgnore(int buttonState) { diff --git a/src/preferences/dialog/dlgprefautodjdlg.ui b/src/preferences/dialog/dlgprefautodjdlg.ui index 7836ebf4c53..d0a841efa1d 100644 --- a/src/preferences/dialog/dlgprefautodjdlg.ui +++ b/src/preferences/dialog/dlgprefautodjdlg.ui @@ -284,6 +284,27 @@ + + + + + 0 + 0 + + + + Set the Crossfader to the center as AutoDj starts a crossfade so the track starts at full volume + + + CrossfaderStartCenterCheckBox + + + + + + + + @@ -298,7 +319,7 @@ - + From e0c9c71921052fecf825445fd182a18072d0758b Mon Sep 17 00:00:00 2001 From: davidlmorris Date: Thu, 5 Sep 2024 07:56:40 +0800 Subject: [PATCH 2/8] Update autodjprocessor.cpp --- src/library/autodj/autodjprocessor.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/library/autodj/autodjprocessor.cpp b/src/library/autodj/autodjprocessor.cpp index 74ed616c5eb..842107f76fd 100644 --- a/src/library/autodj/autodjprocessor.cpp +++ b/src/library/autodj/autodjprocessor.cpp @@ -120,15 +120,17 @@ AutoDJProcessor::AutoDJProcessor( m_eState(ADJ_DISABLED), m_transitionProgress(0.0), m_transitionTime(kTransitionPreferenceDefault) { - m_pAutoDJTableModel = new PlaylistTableModel(this, pTrackCollectionManager, - "mixxx.db.model.autodj"); + m_pAutoDJTableModel = new PlaylistTableModel( + this, pTrackCollectionManager, "mixxx.db.model.autodj"); m_pAutoDJTableModel->selectPlaylist(iAutoDJPlaylistId); m_pAutoDJTableModel->select(); m_pShufflePlaylist = new ControlPushButton( ConfigKey("[AutoDJ]", "shuffle_playlist")); - connect(m_pShufflePlaylist, &ControlPushButton::valueChanged, - this, &AutoDJProcessor::controlShuffle); + connect(m_pShufflePlaylist, + &ControlPushButton::valueChanged, + this, + &AutoDJProcessor::controlShuffle); m_pSkipNext = new ControlPushButton( ConfigKey("[AutoDJ]", "skip_next")); @@ -874,7 +876,10 @@ void AutoDJProcessor::playerPositionChanged(DeckAttributes* pAttributes, // the transitions. If there has been a seek beyond endPos, end // the transition immediately. if ((m_crossfaderStartCenter) && - (transitionProgress <= ((thisDeck->fadeEndPos - thisDeck->fadeBeginPos)/2))) { + (transitionProgress <= + ((thisDeck->fadeEndPos - + thisDeck->fadeBeginPos) / + 2))) { // We want the cross fader to remain in the middle. setCrossfader(0.0); } else { From eee0af2d117402b274559dfd8150136db2c14541 Mon Sep 17 00:00:00 2001 From: Swiftb0y <12380386+Swiftb0y@users.noreply.github.com> Date: Fri, 6 Sep 2024 16:51:55 +0200 Subject: [PATCH 3/8] fix pre-commit please squash this commit into the two earlier ones. --- src/library/autodj/autodjprocessor.cpp | 9 ++++----- src/library/autodj/autodjprocessor.h | 1 - src/preferences/dialog/dlgprefautodj.cpp | 2 -- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/library/autodj/autodjprocessor.cpp b/src/library/autodj/autodjprocessor.cpp index 842107f76fd..bad1f88d795 100644 --- a/src/library/autodj/autodjprocessor.cpp +++ b/src/library/autodj/autodjprocessor.cpp @@ -865,11 +865,10 @@ void AutoDJProcessor::playerPositionChanged(DeckAttributes* pAttributes, (thisDeck->fadeEndPos - thisDeck->fadeBeginPos); double transitionStep = transitionProgress - m_transitionProgress; - if ((transitionProgress == 0.0) && - (m_crossfaderStartCenter)) - { + if ((transitionProgress == 0.0) && + (m_crossfaderStartCenter)) { setCrossfader(0.0); // So we start at the mid point before we make any fader moves. - } + } if (transitionStep > 0.0) { // We have made progress. // Backward seeks pause the transitions; forward seeks speed up @@ -1363,7 +1362,7 @@ void AutoDJProcessor::calculateTransition(DeckAttributes* pFromDeck, } switch (m_transitionMode) { -// case TransitionMode::RadioFullIntroOutro: + // case TransitionMode::RadioFullIntroOutro: case TransitionMode::FullIntroOutro: { // Use the outro or intro length for the transition time, whichever is // shorter. Let the full outro and intro play; do not cut off any part diff --git a/src/library/autodj/autodjprocessor.h b/src/library/autodj/autodjprocessor.h index 9ef9a9a2178..dc9de247492 100644 --- a/src/library/autodj/autodjprocessor.h +++ b/src/library/autodj/autodjprocessor.h @@ -289,7 +289,6 @@ class AutoDJProcessor : public QObject { QList m_decks; - ControlProxy* m_pCOCrossfader; ControlProxy* m_pCOCrossfaderReverse; diff --git a/src/preferences/dialog/dlgprefautodj.cpp b/src/preferences/dialog/dlgprefautodj.cpp index c296600221c..9294b571c68 100644 --- a/src/preferences/dialog/dlgprefautodj.cpp +++ b/src/preferences/dialog/dlgprefautodj.cpp @@ -64,7 +64,6 @@ void DlgPrefAutoDJ::slotUpdate() { CrossfaderStartCenterCheckBox->setChecked(m_pConfig->getValue( ConfigKey("[Auto DJ]", "center_xfader_when_starting_xfade"), false)); - } void DlgPrefAutoDJ::slotApply() { @@ -89,7 +88,6 @@ void DlgPrefAutoDJ::slotApply() { CrossfaderStartCenterCheckBox->isChecked()); } - void DlgPrefAutoDJ::slotResetToDefaults() { MinimumAvailableSpinBox->setValue(20); From c98107f608ddda78c86746062a398fd86682b18d Mon Sep 17 00:00:00 2001 From: davidlmorris Date: Sat, 14 Sep 2024 15:45:16 +0800 Subject: [PATCH 4/8] Update autodjprocessor.cpp --- src/library/autodj/autodjprocessor.cpp | 30 ++++++++++---------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/src/library/autodj/autodjprocessor.cpp b/src/library/autodj/autodjprocessor.cpp index bad1f88d795..cad1f5b5fb3 100644 --- a/src/library/autodj/autodjprocessor.cpp +++ b/src/library/autodj/autodjprocessor.cpp @@ -155,6 +155,8 @@ AutoDJProcessor::AutoDJProcessor( m_pEnabledAutoDJ->connectValueChangeRequest(this, &AutoDJProcessor::controlEnableChangeRequest); + + // TODO(rryan) listen to signals from PlayerManager and add/remove as decks // are created. for (unsigned int i = 0; i < pPlayerManager->numberOfDecks(); ++i) { @@ -172,6 +174,9 @@ AutoDJProcessor::AutoDJProcessor( m_pCOCrossfader = new ControlProxy("[Master]", "crossfader"); m_pCOCrossfaderReverse = new ControlProxy("[Mixer Profile]", "xFaderReverse"); + m_crossfaderStartCenter = m_pConfig->getValue(ConfigKey(kConfigKey, + QStringLiteral("center_xfader_when_starting_xfade"))); + QString str_autoDjTransition = m_pConfig->getValueString( ConfigKey(kConfigKey, kTransitionPreferenceName)); if (!str_autoDjTransition.isEmpty()) { @@ -812,12 +817,14 @@ void AutoDJProcessor::playerPositionChanged(DeckAttributes* pAttributes, otherDeck->setPlayPosition(otherDeck->startPos); } - if (!otherDeckPlaying) { - otherDeck->play(); + if (m_crossfaderStartCenter) { + setCrossfader(0.0); + } else if (thisDeck->fadeBeginPos >= thisDeck->fadeEndPos) { + setCrossfader(thisDeck->isLeft() ? 1.0 : -1.0); } - if (thisDeck->fadeBeginPos >= thisDeck->fadeEndPos) { - setCrossfader(thisDeck->isLeft() ? 1.0 : -1.0); + if (!otherDeckPlaying) { + otherDeck->play(); } // Now that we have started the other deck playing, remove the track @@ -864,31 +871,17 @@ void AutoDJProcessor::playerPositionChanged(DeckAttributes* pAttributes, double transitionProgress = (thisPlayPosition - thisDeck->fadeBeginPos) / (thisDeck->fadeEndPos - thisDeck->fadeBeginPos); double transitionStep = transitionProgress - m_transitionProgress; - - if ((transitionProgress == 0.0) && - (m_crossfaderStartCenter)) { - setCrossfader(0.0); // So we start at the mid point before we make any fader moves. - } if (transitionStep > 0.0) { // We have made progress. // Backward seeks pause the transitions; forward seeks speed up // the transitions. If there has been a seek beyond endPos, end // the transition immediately. - if ((m_crossfaderStartCenter) && - (transitionProgress <= - ((thisDeck->fadeEndPos - - thisDeck->fadeBeginPos) / - 2))) { - // We want the cross fader to remain in the middle. - setCrossfader(0.0); - } else { double remainingCrossfader = crossfaderTarget - currentCrossfader; double adjustment = remainingCrossfader / (1.0 - m_transitionProgress) * transitionStep; // we move the crossfader linearly with // movements in this track's play position. setCrossfader(currentCrossfader + adjustment); - } } m_transitionProgress = transitionProgress; // if we are at 1.0 here, we need an additional callback until the last @@ -1362,7 +1355,6 @@ void AutoDJProcessor::calculateTransition(DeckAttributes* pFromDeck, } switch (m_transitionMode) { - // case TransitionMode::RadioFullIntroOutro: case TransitionMode::FullIntroOutro: { // Use the outro or intro length for the transition time, whichever is // shorter. Let the full outro and intro play; do not cut off any part From e52293ca88832e0e7a07f45bcfe4b83e52320e9f Mon Sep 17 00:00:00 2001 From: davidlmorris Date: Sun, 29 Sep 2024 15:34:46 +0800 Subject: [PATCH 5/8] New transition mode Reintroduction of a new transition mode: called "Skip Silence Start Full Volume". Removal of preferences option. --- src/library/autodj/autodjprocessor.cpp | 21 ++++++++++---------- src/library/autodj/autodjprocessor.h | 3 ++- src/library/autodj/dlgautodj.cpp | 2 ++ src/preferences/dialog/dlgprefautodj.cpp | 6 ------ src/preferences/dialog/dlgprefautodjdlg.ui | 23 +--------------------- 5 files changed, 15 insertions(+), 40 deletions(-) diff --git a/src/library/autodj/autodjprocessor.cpp b/src/library/autodj/autodjprocessor.cpp index cad1f5b5fb3..01e6bb12034 100644 --- a/src/library/autodj/autodjprocessor.cpp +++ b/src/library/autodj/autodjprocessor.cpp @@ -173,9 +173,7 @@ AutoDJProcessor::AutoDJProcessor( m_pCOCrossfader = new ControlProxy("[Master]", "crossfader"); m_pCOCrossfaderReverse = new ControlProxy("[Mixer Profile]", "xFaderReverse"); - - m_crossfaderStartCenter = m_pConfig->getValue(ConfigKey(kConfigKey, - QStringLiteral("center_xfader_when_starting_xfade"))); + m_crossfaderStartCenter = false; QString str_autoDjTransition = m_pConfig->getValueString( ConfigKey(kConfigKey, kTransitionPreferenceName)); @@ -573,8 +571,6 @@ AutoDJProcessor::AutoDJError AutoDJProcessor::toggleAutoDJ(bool enable) { setCrossfader(1.0); } } - m_crossfaderStartCenter = m_pConfig->getValue(ConfigKey(kConfigKey, - QStringLiteral("center_xfader_when_starting_xfade"))); emitAutoDJStateChanged(m_eState); } else { // Disable Auto DJ m_pEnabledAutoDJ->setAndConfirm(0.0); @@ -876,12 +872,12 @@ void AutoDJProcessor::playerPositionChanged(DeckAttributes* pAttributes, // Backward seeks pause the transitions; forward seeks speed up // the transitions. If there has been a seek beyond endPos, end // the transition immediately. - double remainingCrossfader = crossfaderTarget - currentCrossfader; - double adjustment = remainingCrossfader / - (1.0 - m_transitionProgress) * transitionStep; - // we move the crossfader linearly with - // movements in this track's play position. - setCrossfader(currentCrossfader + adjustment); + double remainingCrossfader = crossfaderTarget - currentCrossfader; + double adjustment = remainingCrossfader / + (1.0 - m_transitionProgress) * transitionStep; + // we move the crossfader linearly with + // movements in this track's play position. + setCrossfader(currentCrossfader + adjustment); } m_transitionProgress = transitionProgress; // if we are at 1.0 here, we need an additional callback until the last @@ -1354,6 +1350,7 @@ void AutoDJProcessor::calculateTransition(DeckAttributes* pFromDeck, << "outroLength" << outroLength; } + m_crossfaderStartCenter = false; switch (m_transitionMode) { case TransitionMode::FullIntroOutro: { // Use the outro or intro length for the transition time, whichever is @@ -1453,6 +1450,8 @@ void AutoDJProcessor::calculateTransition(DeckAttributes* pFromDeck, useFixedFadeTime(pFromDeck, pToDeck, fromDeckPosition, outroEnd, toDeckStartSeconds); } } break; + case TransitionMode::FixedStartCenterSkipSilence: + m_crossfaderStartCenter = true; case TransitionMode::FixedSkipSilence: { double toDeckStartSecond; pToDeck->fadeBeginPos = getLastSoundSecond(pToDeck); diff --git a/src/library/autodj/autodjprocessor.h b/src/library/autodj/autodjprocessor.h index dc9de247492..3d60893b7c5 100644 --- a/src/library/autodj/autodjprocessor.h +++ b/src/library/autodj/autodjprocessor.h @@ -163,7 +163,8 @@ class AutoDJProcessor : public QObject { FullIntroOutro, FadeAtOutroStart, FixedFullTrack, - FixedSkipSilence + FixedSkipSilence, + FixedStartCenterSkipSilence }; AutoDJProcessor(QObject* pParent, diff --git a/src/library/autodj/dlgautodj.cpp b/src/library/autodj/dlgautodj.cpp index c8d2582a0ce..84d931444ff 100644 --- a/src/library/autodj/dlgautodj.cpp +++ b/src/library/autodj/dlgautodj.cpp @@ -179,6 +179,8 @@ DlgAutoDJ::DlgAutoDJ(WLibrary* parent, static_cast(AutoDJProcessor::TransitionMode::FixedFullTrack)); fadeModeCombobox->addItem(tr("Skip Silence"), static_cast(AutoDJProcessor::TransitionMode::FixedSkipSilence)); + fadeModeCombobox->addItem(tr("Skip Silence Start Full Volume"), + static_cast(AutoDJProcessor::TransitionMode::FixedStartCenterSkipSilence)); fadeModeCombobox->setCurrentIndex( fadeModeCombobox->findData(static_cast(m_pAutoDJProcessor->getTransitionMode()))); connect(fadeModeCombobox, diff --git a/src/preferences/dialog/dlgprefautodj.cpp b/src/preferences/dialog/dlgprefautodj.cpp index 9294b571c68..69e5069698c 100644 --- a/src/preferences/dialog/dlgprefautodj.cpp +++ b/src/preferences/dialog/dlgprefautodj.cpp @@ -61,9 +61,6 @@ void DlgPrefAutoDJ::slotUpdate() { // Re-center the crossfader instantly when AutoDJ is disabled CenterXfaderCheckBox->setChecked(m_pConfig->getValue( ConfigKey("[Auto DJ]", "center_xfader_when_disabling"), false)); - - CrossfaderStartCenterCheckBox->setChecked(m_pConfig->getValue( - ConfigKey("[Auto DJ]", "center_xfader_when_starting_xfade"), false)); } void DlgPrefAutoDJ::slotApply() { @@ -84,8 +81,6 @@ void DlgPrefAutoDJ::slotApply() { m_pConfig->setValue(ConfigKey("[Auto DJ]", "center_xfader_when_disabling"), CenterXfaderCheckBox->isChecked()); - m_pConfig->setValue(ConfigKey("[Auto DJ]", "center_xfader_when_starting_xfade"), - CrossfaderStartCenterCheckBox->isChecked()); } void DlgPrefAutoDJ::slotResetToDefaults() { @@ -101,7 +96,6 @@ void DlgPrefAutoDJ::slotResetToDefaults() { RandomQueueMinimumSpinBox->setValue(5); CenterXfaderCheckBox->setChecked(false); - CrossfaderStartCenterCheckBox->setChecked(false); } void DlgPrefAutoDJ::slotToggleRequeueIgnore(int buttonState) { diff --git a/src/preferences/dialog/dlgprefautodjdlg.ui b/src/preferences/dialog/dlgprefautodjdlg.ui index d0a841efa1d..7836ebf4c53 100644 --- a/src/preferences/dialog/dlgprefautodjdlg.ui +++ b/src/preferences/dialog/dlgprefautodjdlg.ui @@ -284,27 +284,6 @@ - - - - - 0 - 0 - - - - Set the Crossfader to the center as AutoDj starts a crossfade so the track starts at full volume - - - CrossfaderStartCenterCheckBox - - - - - - - - @@ -319,7 +298,7 @@ - + From 36ece4fb1ef5bea1ffd2c960a096a186c254b4d4 Mon Sep 17 00:00:00 2001 From: davidlmorris Date: Sun, 29 Sep 2024 19:33:13 +0800 Subject: [PATCH 6/8] Update autodjprocessor.cpp Code style issues (can't deal with a space at the end of a line?). --- src/library/autodj/autodjprocessor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/library/autodj/autodjprocessor.cpp b/src/library/autodj/autodjprocessor.cpp index 01e6bb12034..0f4afe28ec6 100644 --- a/src/library/autodj/autodjprocessor.cpp +++ b/src/library/autodj/autodjprocessor.cpp @@ -816,7 +816,7 @@ void AutoDJProcessor::playerPositionChanged(DeckAttributes* pAttributes, if (m_crossfaderStartCenter) { setCrossfader(0.0); } else if (thisDeck->fadeBeginPos >= thisDeck->fadeEndPos) { - setCrossfader(thisDeck->isLeft() ? 1.0 : -1.0); + setCrossfader(thisDeck->isLeft() ? 1.0 : -1.0); } if (!otherDeckPlaying) { @@ -1450,7 +1450,7 @@ void AutoDJProcessor::calculateTransition(DeckAttributes* pFromDeck, useFixedFadeTime(pFromDeck, pToDeck, fromDeckPosition, outroEnd, toDeckStartSeconds); } } break; - case TransitionMode::FixedStartCenterSkipSilence: + case TransitionMode::FixedStartCenterSkipSilence: m_crossfaderStartCenter = true; case TransitionMode::FixedSkipSilence: { double toDeckStartSecond; From c0360cd054255e7cf482106f2a6917752a404ae0 Mon Sep 17 00:00:00 2001 From: davidlmorris Date: Sun, 29 Sep 2024 19:43:25 +0800 Subject: [PATCH 7/8] Update autodjprocessor.cpp Code style issues getting weirder. --- src/library/autodj/autodjprocessor.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/library/autodj/autodjprocessor.cpp b/src/library/autodj/autodjprocessor.cpp index 0f4afe28ec6..70f78395417 100644 --- a/src/library/autodj/autodjprocessor.cpp +++ b/src/library/autodj/autodjprocessor.cpp @@ -155,8 +155,6 @@ AutoDJProcessor::AutoDJProcessor( m_pEnabledAutoDJ->connectValueChangeRequest(this, &AutoDJProcessor::controlEnableChangeRequest); - - // TODO(rryan) listen to signals from PlayerManager and add/remove as decks // are created. for (unsigned int i = 0; i < pPlayerManager->numberOfDecks(); ++i) { From 28462a0aa4855b92630a3499b02c93c856c48df8 Mon Sep 17 00:00:00 2001 From: davidlmorris Date: Sun, 29 Sep 2024 19:51:40 +0800 Subject: [PATCH 8/8] Update autodjprocessor.cpp --- src/library/autodj/autodjprocessor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/library/autodj/autodjprocessor.cpp b/src/library/autodj/autodjprocessor.cpp index 70f78395417..3c1e0d6f927 100644 --- a/src/library/autodj/autodjprocessor.cpp +++ b/src/library/autodj/autodjprocessor.cpp @@ -1450,6 +1450,8 @@ void AutoDJProcessor::calculateTransition(DeckAttributes* pFromDeck, } break; case TransitionMode::FixedStartCenterSkipSilence: m_crossfaderStartCenter = true; + // fall through intended! + [[fallthrough]]; case TransitionMode::FixedSkipSilence: { double toDeckStartSecond; pToDeck->fadeBeginPos = getLastSoundSecond(pToDeck);