From c87193f52f6c7829b1ed3d2694580eaaf73cdda4 Mon Sep 17 00:00:00 2001 From: derselbst Date: Tue, 24 Apr 2018 14:10:31 +0200 Subject: [PATCH] Revert "empty the analyzer when playback stops" This reverts commit 6da7055caa738fcfeb1c645198c3008b87b45acc. --- gui/applets/analyzer/AnalyzerApplet.cpp | 11 ----------- gui/applets/analyzer/AnalyzerApplet.h | 1 - gui/applets/analyzer/AnalyzerBase.cpp | 5 ----- gui/applets/analyzer/AnalyzerBase.h | 1 - 4 files changed, 18 deletions(-) diff --git a/gui/applets/analyzer/AnalyzerApplet.cpp b/gui/applets/analyzer/AnalyzerApplet.cpp index 4f4caafd..5bab0283 100644 --- a/gui/applets/analyzer/AnalyzerApplet.cpp +++ b/gui/applets/analyzer/AnalyzerApplet.cpp @@ -41,14 +41,12 @@ void AnalyzerApplet::closeEvent(QCloseEvent *e) void AnalyzerApplet::startGraphics() { this->player->onPlayheadChanged += make_pair(this, &AnalyzerApplet::redraw); - this->player->onIsPlayingChanged += make_pair(this, &AnalyzerApplet::reset); this->analyzerWidget->connectSignals(); } void AnalyzerApplet::stopGraphics() { this->player->onPlayheadChanged -= this; - this->player->onIsPlayingChanged -= this; if (this->analyzerWidget != nullptr) { @@ -107,12 +105,3 @@ void AnalyzerApplet::redraw(void *ctx, frame_t pos) context->analyzerWidget->processData(context->player->getCurrentSong(), pos); } - -void AnalyzerApplet::reset(void *ctx, bool isPlaying, Nullable) -{ - AnalyzerApplet *context = static_cast(ctx); - if(!isPlaying) - { - context->analyzerWidget->reset(); - } -} diff --git a/gui/applets/analyzer/AnalyzerApplet.h b/gui/applets/analyzer/AnalyzerApplet.h index 5b1c47d9..d0fdde63 100644 --- a/gui/applets/analyzer/AnalyzerApplet.h +++ b/gui/applets/analyzer/AnalyzerApplet.h @@ -42,7 +42,6 @@ class AnalyzerApplet : public QMainWindow void closeEvent(QCloseEvent *e) override; static void redraw(void *ctx, frame_t pos); - static void reset(void *ctx, bool, Nullable); }; #endif // ANALYZERAPPLET_H diff --git a/gui/applets/analyzer/AnalyzerBase.cpp b/gui/applets/analyzer/AnalyzerBase.cpp index 24cf50f4..e1517a88 100644 --- a/gui/applets/analyzer/AnalyzerBase.cpp +++ b/gui/applets/analyzer/AnalyzerBase.cpp @@ -172,10 +172,5 @@ void AnalyzerBase::setFps(int fps) m_renderTimer->setInterval(1000 / fps); } -void AnalyzerBase::reset() -{ - m_fftData.fill(0); - analyze(m_fftData); -} #include "AnalyzerBase.moc" diff --git a/gui/applets/analyzer/AnalyzerBase.h b/gui/applets/analyzer/AnalyzerBase.h index 27eb7093..5561055d 100644 --- a/gui/applets/analyzer/AnalyzerBase.h +++ b/gui/applets/analyzer/AnalyzerBase.h @@ -62,7 +62,6 @@ class AnalyzerBase : public QGLWidget void disconnectSignals(); // void currentDesktopChanged(); void processData(const Song *s, frame_t playhead); - void reset(); };