Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi Preview Fix #3382

Merged
merged 21 commits into from
Jan 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
58310ee
Only allow one previewing hotcue at the time. This is required for a …
daschuer Nov 20, 2020
5fd6d41
discard cued seek action after a new track has been loaded
daschuer Nov 21, 2020
10f9e9d
Remove redundant handling of the Main cue
daschuer Nov 21, 2020
9f1b93c
Improve locking
daschuer Nov 21, 2020
8b0614d
Add function overload to createAndAddCue() to initalize the cue as well
daschuer Nov 29, 2020
3e6775a
Add Cue::setStartAndEndPosition() for setting both under one locking …
daschuer Nov 29, 2020
39ff078
Create and initalize Cues at once to avoid sending singlas with halve…
daschuer Nov 29, 2020
7159a99
get rid of hotCueFound
daschuer Nov 29, 2020
234f90b
remove now unused createAndAddCue() that creates an invalid Cue
daschuer Nov 29, 2020
c38fd68
Remove unused Cue() default constructor
daschuer Nov 29, 2020
15e10bb
make m_iHotCue const
daschuer Nov 29, 2020
2d75861
Added getStartAndEndPosition() to query both in one locking scope.
daschuer Nov 29, 2020
ffcb727
Use getStartAndEndPosition() to be sure the two values match.
daschuer Nov 29, 2020
ad7a2b2
Improve API for storing of the inital preview state.
daschuer Nov 29, 2020
d72f2b4
fix typos
daschuer Dec 16, 2020
bac1956
Merge remote-tracking branch 'upstream/main' into hotcue_focus_off_by…
daschuer Dec 16, 2020
90342c4
Make a local copy of m_pCurrentSavedLoopControl to make sur it doe no…
daschuer Dec 16, 2020
512573d
rename storePreviewingActivateData() to cachePreviewingStartState() a…
daschuer Dec 16, 2020
58f9939
Reorder member variables
daschuer Dec 16, 2020
4114b16
swap if else logic
daschuer Dec 16, 2020
ad9bddb
narrow locking scope
daschuer Dec 16, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 23 additions & 18 deletions src/analyzer/analyzersilence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,20 @@ void AnalyzerSilence::storeResults(TrackPointer pTrack) {

CuePointer pAudibleSound = pTrack->findCueByType(mixxx::CueType::AudibleSound);
if (pAudibleSound == nullptr) {
pAudibleSound = pTrack->createAndAddCue();
pAudibleSound->setType(mixxx::CueType::AudibleSound);
pAudibleSound = pTrack->createAndAddCue(
mixxx::CueType::AudibleSound,
Cue::kNoHotCue,
firstSound,
lastSound);
} else {
// The user has no way to directly edit the AudibleSound cue. If the user
// has deleted the Intro or Outro Cue, this analysis will be rerun when
// the track is loaded again. In this case, adjust the AudibleSound Cue's
// positions. This could be helpful, for example, when the track length
// is changed in a different program, or the silence detection threshold
// is changed.
pAudibleSound->setStartAndEndPosition(firstSound, lastSound);
}
// The user has no way to directly edit the AudibleSound cue. If the user
// has deleted the Intro or Outro Cue, this analysis will be rerun when
// the track is loaded again. In this case, adjust the AudibleSound Cue's
// positions. This could be helpful, for example, when the track length
// is changed in a different program, or the silence detection threshold
// is changed.
pAudibleSound->setStartPosition(firstSound);
pAudibleSound->setEndPosition(lastSound);

CuePointer pIntroCue = pTrack->findCueByType(mixxx::CueType::Intro);

Expand All @@ -126,17 +129,19 @@ void AnalyzerSilence::storeResults(TrackPointer pTrack) {
}

if (pIntroCue == nullptr) {
pIntroCue = pTrack->createAndAddCue();
pIntroCue->setType(mixxx::CueType::Intro);
pIntroCue->setStartPosition(introStart);
pIntroCue->setEndPosition(Cue::kNoPosition);
pIntroCue = pTrack->createAndAddCue(
mixxx::CueType::Intro,
Cue::kNoHotCue,
introStart,
Cue::kNoPosition);
}

CuePointer pOutroCue = pTrack->findCueByType(mixxx::CueType::Outro);
if (pOutroCue == nullptr) {
pOutroCue = pTrack->createAndAddCue();
pOutroCue->setType(mixxx::CueType::Outro);
pOutroCue->setStartPosition(Cue::kNoPosition);
pOutroCue->setEndPosition(lastSound);
pOutroCue = pTrack->createAndAddCue(
mixxx::CueType::Outro,
Cue::kNoHotCue,
Cue::kNoPosition,
lastSound);
}
}
Loading