diff options
author | Owen Williams <owilliams@mixxx.org> | 2015-03-29 15:47:53 -0400 |
---|---|---|
committer | Owen Williams <owilliams@mixxx.org> | 2015-03-29 15:47:53 -0400 |
commit | 6bc9cc256a18b30b1541942d66db9071ac6c9216 (patch) | |
tree | 1cb1011d647f6519b1b3e5722dc6d5430b11e637 /src/vinylcontrol/vinylcontrolxwax.cpp | |
parent | 657dfcd7eeef492296a1978cac1078b15cc32b17 (diff) |
Improve vinyl control logic for determining when to update the rate slider
Diffstat (limited to 'src/vinylcontrol/vinylcontrolxwax.cpp')
-rw-r--r-- | src/vinylcontrol/vinylcontrolxwax.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/vinylcontrol/vinylcontrolxwax.cpp b/src/vinylcontrol/vinylcontrolxwax.cpp index 046d9c0845..bf162753c5 100644 --- a/src/vinylcontrol/vinylcontrolxwax.cpp +++ b/src/vinylcontrol/vinylcontrolxwax.cpp @@ -596,7 +596,7 @@ void VinylControlXwax::analyzeSamples(CSAMPLE* pSamples, size_t nFrames) { } m_pVCRate->set(averagePitch + dDriftControl); - if (m_iPosition != -1 && reportedPlayButton && uiUpdateTime(filePosition)) { + if (uiUpdateTime(filePosition)) { double true_pitch = averagePitch + dDriftControl; double pitch_difference = true_pitch - m_dDisplayPitch; @@ -617,8 +617,10 @@ void VinylControlXwax::analyzeSamples(CSAMPLE* pSamples, size_t nFrames) { m_dDisplayPitch += pitch_difference * .01; } // Don't show extremely high or low speeds in the UI. - if (m_dDisplayPitch < 1.9 && m_dDisplayPitch > 0.2) { - m_pRateSlider->set(rateDir->get() * (m_dDisplayPitch - 1.0) / rateRange->get()); + if (reportedPlayButton && !scratching->get() && + m_dDisplayPitch < 1.9 && m_dDisplayPitch > 0.2) { + m_pRateSlider->set(rateDir->get() * + (m_dDisplayPitch - 1.0) / rateRange->get()); } else { m_pRateSlider->set(0.0); } |