From f58a2ed9fda4fcd993864e3db302ab060c63babf Mon Sep 17 00:00:00 2001 From: ronso0 Date: Sun, 12 Jun 2022 14:23:30 +0200 Subject: [PATCH] passthrough: when enabled disable CUE/Play indicators --- src/engine/controls/cuecontrol.cpp | 3 ++- src/engine/enginebuffer.cpp | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/engine/controls/cuecontrol.cpp b/src/engine/controls/cuecontrol.cpp index 75a8469964bd..ddf793447ef6 100644 --- a/src/engine/controls/cuecontrol.cpp +++ b/src/engine/controls/cuecontrol.cpp @@ -1181,7 +1181,6 @@ void CueControl::cuePlay(double value) { // If not freely playing (i.e. stopped or platter IS being touched), press to go to cue and stop. // On release, start playing from cue point. - QMutexLocker lock(&m_mutex); const auto freely_playing = m_pPlay->toBool() && !getEngineBuffer()->getScratching(); TrackAt trackAt = getTrackAt(); @@ -2030,6 +2029,7 @@ void HotcueControl::setCue(const CuePointer& pCue) { // because we have a null check for valid data else where in the code m_pCue = pCue; } + mixxx::RgbColor::optional_t HotcueControl::getColor() const { return doubleToRgbColor(m_hotcueColor->get()); } @@ -2039,6 +2039,7 @@ void HotcueControl::setColor(mixxx::RgbColor::optional_t newColor) { m_hotcueColor->set(*newColor); } } + void HotcueControl::resetCue() { // clear pCue first because we have a null check for valid data else where // in the code diff --git a/src/engine/enginebuffer.cpp b/src/engine/enginebuffer.cpp index 2e4f78c1e1b1..d6cd604a0057 100644 --- a/src/engine/enginebuffer.cpp +++ b/src/engine/enginebuffer.cpp @@ -584,6 +584,12 @@ void EngineBuffer::slotPassthroughChanged(double enabled) { if (enabled > 0) { // If passthrough was enabled, stop playing the current track. slotControlStop(1.0); + // Disable CUE and Play indicators + m_pCueControl->resetIndicators(); + } else { + // Update CUE and Play indicators. Note: m_pCueControl->updateIndicators() + // is not sufficient. + updateIndicatorsAndModifyPlay(false, false); } }