Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-updates-src > by-pkgid > e68b3eb143edc33a00806a786117fcd3 > files > 4

clementine-1.3.1-10.git20191016.1.1.mga7.src.rpm

diff -up Clementine-fb00835468295925a6945a286406a2eec6bdb67a/src/analyzers/analyzerbase.cpp.lastscope Clementine-fb00835468295925a6945a286406a2eec6bdb67a/src/analyzers/analyzerbase.cpp
--- Clementine-fb00835468295925a6945a286406a2eec6bdb67a/src/analyzers/analyzerbase.cpp.lastscope	2018-10-05 11:56:49.000000000 +0200
+++ Clementine-fb00835468295925a6945a286406a2eec6bdb67a/src/analyzers/analyzerbase.cpp	2018-10-21 00:36:34.063123150 +0200
@@ -107,6 +107,7 @@ void Analyzer::Base::paintEvent(QPaintEv
       const Engine::Scope& thescope = engine_->scope(timeout_);
       int i = 0;
 
+      lastScope_.resize(fht_->size());
       // convert to mono here - our built in analyzers need mono, but the
       // engines provide interleaved pcm
       for (uint x = 0; static_cast<int>(x) < fht_->size(); ++x) {
@@ -225,7 +226,7 @@ QColor Analyzer::Base::getPsychedelicCol
   // Calculate total magnitudes for different bark bands.
   double bands[sBarkBandCount]{};
 
-  for (int i = 0; i < barkband_table_.size(); ++i) {
+  for (int i = 0; i < std::min(barkband_table_.size(), (int)scope.size()); ++i) {
     bands[barkband_table_[i]] += scope[i];
   }