From 124ca3fe64f90d5abf49bd66aa7224c10358fc4a Mon Sep 17 00:00:00 2001 From: David Sansome Date: Mon, 19 Apr 2010 14:24:11 +0000 Subject: [PATCH] Lock all analyzers to 25fps, should reduce CPU usage quite a bit --- src/analyzers/analyzerbase.cpp | 4 ++-- src/analyzers/analyzerbase.h | 2 +- src/analyzers/baranalyzer.cpp | 2 +- src/analyzers/blockanalyzer.cpp | 2 +- src/analyzers/boomanalyzer.cpp | 2 +- src/analyzers/sonogram.cpp | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/analyzers/analyzerbase.cpp b/src/analyzers/analyzerbase.cpp index 12c9e57e6..2da5c81e3 100644 --- a/src/analyzers/analyzerbase.cpp +++ b/src/analyzers/analyzerbase.cpp @@ -42,9 +42,9 @@ template class Analyzer::Base; #endif -Analyzer::Base::Base( QWidget *parent, uint timeout, uint scopeSize ) +Analyzer::Base::Base( QWidget *parent, uint scopeSize ) : QWidget( parent ) - , m_timeout( timeout ) + , m_timeout( 40 ) // msec , m_fht( new FHT(scopeSize) ) , m_engine(NULL) , m_lastScope(512) diff --git a/src/analyzers/analyzerbase.h b/src/analyzers/analyzerbase.h index ed27b26a2..40ebdcb4c 100644 --- a/src/analyzers/analyzerbase.h +++ b/src/analyzers/analyzerbase.h @@ -46,7 +46,7 @@ public: void set_engine(EngineBase* engine) { m_engine = engine; } protected: - Base( QWidget*, uint timeout, uint scopeSize = 7 ); + Base( QWidget*, uint scopeSize = 7 ); void hideEvent(QHideEvent *); void showEvent(QShowEvent *); diff --git a/src/analyzers/baranalyzer.cpp b/src/analyzers/baranalyzer.cpp index cb1dd09ad..33d9a99d9 100644 --- a/src/analyzers/baranalyzer.cpp +++ b/src/analyzers/baranalyzer.cpp @@ -20,7 +20,7 @@ const char* BarAnalyzer::kName = QT_TRANSLATE_NOOP("AnalyzerContainer", "Bar ana BarAnalyzer::BarAnalyzer( QWidget *parent ) - : Analyzer::Base( parent, 12, 8 ) + : Analyzer::Base( parent, 8 ) //, m_bands( BAND_COUNT ) //, barVector( BAND_COUNT, 0 ) //, roofVector( BAND_COUNT, 50 ) diff --git a/src/analyzers/blockanalyzer.cpp b/src/analyzers/blockanalyzer.cpp index 419ffbf36..419a8a6a6 100644 --- a/src/analyzers/blockanalyzer.cpp +++ b/src/analyzers/blockanalyzer.cpp @@ -24,7 +24,7 @@ const uint BlockAnalyzer::FADE_SIZE = 90; const char* BlockAnalyzer::kName = QT_TRANSLATE_NOOP("AnalyzerContainer", "Block analyzer"); BlockAnalyzer::BlockAnalyzer( QWidget *parent ) - : Analyzer::Base( parent, 20, 9 ) + : Analyzer::Base( parent, 9 ) , m_columns( 0 ) //uint , m_rows( 0 ) //uint , m_y( 0 ) //uint diff --git a/src/analyzers/boomanalyzer.cpp b/src/analyzers/boomanalyzer.cpp index 5c53fd433..77dfec185 100644 --- a/src/analyzers/boomanalyzer.cpp +++ b/src/analyzers/boomanalyzer.cpp @@ -8,7 +8,7 @@ const char* BoomAnalyzer::kName = QT_TRANSLATE_NOOP("AnalyzerContainer", "Boom analyzer"); BoomAnalyzer::BoomAnalyzer( QWidget *parent ) - : Analyzer::Base( parent, 10, 9 ) + : Analyzer::Base( parent, 9 ) , K_barHeight( 1.271 )//1.471 , F_peakSpeed( 1.103 )//1.122 , F( 1.0 ) diff --git a/src/analyzers/sonogram.cpp b/src/analyzers/sonogram.cpp index b7e303191..91ef44ce9 100644 --- a/src/analyzers/sonogram.cpp +++ b/src/analyzers/sonogram.cpp @@ -18,7 +18,7 @@ const char* Sonogram::kName = QT_TRANSLATE_NOOP("AnalyzerContainer", "Sonogram"); Sonogram::Sonogram(QWidget *parent) : - Analyzer::Base(parent, 16, 9) + Analyzer::Base(parent, 9) { }