Skip to content

Commit

Permalink
Revert "empty the analyzer when playback stops"
Browse files Browse the repository at this point in the history
This reverts commit 6da7055.
  • Loading branch information
derselbst committed Apr 24, 2018
1 parent 6da7055 commit c87193f
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 18 deletions.
11 changes: 0 additions & 11 deletions gui/applets/analyzer/AnalyzerApplet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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<string>)
{
AnalyzerApplet *context = static_cast<AnalyzerApplet *>(ctx);
if(!isPlaying)
{
context->analyzerWidget->reset();
}
}
1 change: 0 additions & 1 deletion gui/applets/analyzer/AnalyzerApplet.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>);
};

#endif // ANALYZERAPPLET_H
5 changes: 0 additions & 5 deletions gui/applets/analyzer/AnalyzerBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
1 change: 0 additions & 1 deletion gui/applets/analyzer/AnalyzerBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ class AnalyzerBase : public QGLWidget
void disconnectSignals();
// void currentDesktopChanged();
void processData(const Song *s, frame_t playhead);
void reset();
};


Expand Down

0 comments on commit c87193f

Please sign in to comment.