diff options
author | Daniel Schürmann <daschuer@mixxx.org> | 2015-09-12 22:57:50 +0200 |
---|---|---|
committer | Daniel Schürmann <daschuer@mixxx.org> | 2015-09-12 22:57:50 +0200 |
commit | cc4f620f87ff574d45333a87234879ddf1f71b22 (patch) | |
tree | daa3976d46e6bfda6a739bf8fbf66f253a6af4b7 /src/vinylcontrol/vinylcontrolxwax.cpp | |
parent | a3cbfcdd1065adf272c8b80c101f8c6309c5641d (diff) |
use COS in VinylControl
Diffstat (limited to 'src/vinylcontrol/vinylcontrolxwax.cpp')
-rw-r--r-- | src/vinylcontrol/vinylcontrolxwax.cpp | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/src/vinylcontrol/vinylcontrolxwax.cpp b/src/vinylcontrol/vinylcontrolxwax.cpp index bf162753c5..e810a9d5e5 100644 --- a/src/vinylcontrol/vinylcontrolxwax.cpp +++ b/src/vinylcontrol/vinylcontrolxwax.cpp @@ -427,16 +427,15 @@ void VinylControlXwax::analyzeSamples(CSAMPLE* pSamples, size_t nFrames) { return; } else if (m_bTrackSelectMode) { //qDebug() << "discontinuing select mode, selecting track"; - if (m_pControlTrackLoader == NULL) - m_pControlTrackLoader = new ControlObjectThread(m_group,"LoadSelectedTrack"); - - if (!m_pControlTrackLoader) { - qDebug() << "ERROR: couldn't get track loading object?"; - } else { - m_pControlTrackLoader->slotSet(1.0); - m_pControlTrackLoader->slotSet(0.0); //I think I have to do this... + if (m_pControlTrackLoader == NULL) { + m_pControlTrackLoader = new ControlObjectSlave( + m_group, "LoadSelectedTrack", this); } - //if position is known and safe then no track select mode + + m_pControlTrackLoader->slotSet(1.0); + m_pControlTrackLoader->slotSet(0.0); // I think I have to do this... + + // if position is known and safe then no track select mode m_bTrackSelectMode = false; } } @@ -713,13 +712,10 @@ void VinylControlXwax::doTrackSelection(bool valid_pos, double pitch, double pos const double NOPOS_SPEED = 0.50; if (m_pControlTrackSelector == NULL) { - //this isn't done in the constructor because this object - //doesn't seem to be created yet - m_pControlTrackSelector = new ControlObjectThread("[Playlist]","SelectTrackKnob"); - if (m_pControlTrackSelector == NULL) { - qDebug() << "Warning: Track Selector control object NULL"; - return; - } + // this isn't done in the constructor because this object + // doesn't seem to be created yet + m_pControlTrackSelector = new ControlObjectSlave( + "[Playlist]","SelectTrackKnob", this); } if (!valid_pos) { @@ -746,7 +742,7 @@ void VinylControlXwax::doTrackSelection(bool valid_pos, double pitch, double pos m_dLastTrackSelectPos = m_dCurTrackSelectPos; } else if (fabs(m_dCurTrackSelectPos - m_dLastTrackSelectPos) > SELECT_INTERVAL) { //only adjust by one at a time. It's no help jumping around - m_pControlTrackSelector->slotSet((int)(m_dCurTrackSelectPos - m_dLastTrackSelectPos) / fabs(m_dCurTrackSelectPos - m_dLastTrackSelectPos)); + m_pControlTrackSelector->set((int)(m_dCurTrackSelectPos - m_dLastTrackSelectPos) / fabs(m_dCurTrackSelectPos - m_dLastTrackSelectPos)); m_dLastTrackSelectPos = m_dCurTrackSelectPos; } } |