Skip to content

Commit

Permalink
Auto DJ: Don't use pToDeck->introEndPosition() directly.
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed Apr 14, 2023
1 parent 665dd65 commit 7c039ad
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/library/autodj/autodjprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1271,12 +1271,11 @@ void AutoDJProcessor::calculateTransition(DeckAttributes* pFromDeck,
}

double introLength = 0;
const double introEndSample = pToDeck->introEndPosition();
if (introEndSample != Cue::kNoPosition) {
const double introEnd = samplePositionToSeconds(introEndSample, pToDeck);
if (introStart < introEnd) {
introLength = introEnd - introStart;
}

// This returns introStart in case the user has not yet set an intro end
const double introEnd = getIntroEndSecond(pToDeck);
if (introStart < introEnd) {
introLength = introEnd - introStart;
}

if constexpr (sDebug) {
Expand Down

0 comments on commit 7c039ad

Please sign in to comment.