Skip to content
/ mixxx Public
forked from mixxxdj/mixxx

Commit

Permalink
Notify PlayerInfo class when a track is unloaded
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed Jun 29, 2021
1 parent 3f1e647 commit 37c41e5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/mixer/basetrackplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,8 @@ TrackPointer BaseTrackPlayerImpl::unloadTrack() {
return TrackPointer();
}

PlayerInfo::instance().setTrackInfo(getGroup(), TrackPointer());

// Save the loops that are currently set in a loop cue. If no loop cue is
// currently on the track, then create a new one.
double loopStart = m_pLoopInPoint->get();
Expand Down
8 changes: 7 additions & 1 deletion src/mixer/playerinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,13 @@ void PlayerInfo::updateCurrentPlayingDeck() {
int oldDeck = m_currentlyPlayingDeck.fetchAndStoreRelease(maxDeck);
if (maxDeck != oldDeck) {
emit currentPlayingDeckChanged(maxDeck);
emit currentPlayingTrackChanged(getCurrentPlayingTrack());
// Note: When starting Auto-DJ "play" might be processed before a new
// is track is fully loaded. currentPlayingTrackChanged() is then emitted
// later setTrackInfo()
TrackPointer pTrack = getCurrentPlayingTrack();
if (pTrack) {
emit currentPlayingTrackChanged(pTrack);
}
}
}

Expand Down

0 comments on commit 37c41e5

Please sign in to comment.