-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
add 'LoadTrackFromDeck' and '~Sampler' controls #11244
Conversation
65cc54a
to
0f1e2c1
Compare
src/mixer/basetrackplayer.cpp
Outdated
@@ -650,6 +666,34 @@ void BaseTrackPlayerImpl::slotCloneChannel(EngineChannel* pChannel) { | |||
slotLoadTrack(pTrack, false); | |||
} | |||
|
|||
void BaseTrackPlayerImpl::slotLoadTrackFromDeck(double d) { | |||
int deck = static_cast<int>(d); | |||
if (deck >= 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to check for the lower bound and not for the upper? I consider to remove the check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed it.
If the group name is invalid it'll fail in loadTrackFromGroup
anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No objections, to add this. Just some comments.
return; | ||
} | ||
|
||
TrackPointer pTrack = pChannel->getEngineBuffer()->getLoadedTrack(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A null check for pChannel->getEngineBuffer() can't hurt here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The BaseTrackPlayerImpl
constructor creates a new EngineDeck
which creates the EngineBuffer
, and not even there is a a check for pEngineBuffer
, so why here? if it was missing for whatever reason Mixxx would have fallen apart long before LoadTrackFromDeck could be triggered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, right. So this is a perfect use case of 'gsl::not_null<>. But probably a topic for an extra pull request.
0f1e2c1
to
2a02687
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thank you.
Can you also take care to add these new controls to the manual? |
this just loads the track from the source deck.
Background:
for my controller mapping I abuse the clone controls to copy tracks into parking slots (samplers 1-8 or decks 3/4) and recall them later on.
Currently, I need to stop the parking deck immediatley after cloning to suppress undesired sounds. With this simple 'Load' control I don't need to care.