From 098178c7e589b2edb9fa0888715dd38c37d2ae4e Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Sep 07 2018 01:37:10 +0000 Subject: Improvement on the previous patch. Fixes RHBZ#1624618 --- diff --git a/clementine-lastscope-size.patch b/clementine-lastscope-size.patch index 01977ba..c43941d 100644 --- a/clementine-lastscope-size.patch +++ b/clementine-lastscope-size.patch @@ -1,12 +1,20 @@ diff -rupN Clementine-1.3.1.org/src/analyzers/analyzerbase.cpp Clementine-1.3.1/src/analyzers/analyzerbase.cpp --- Clementine-1.3.1.org/src/analyzers/analyzerbase.cpp 2016-04-19 11:08:35.000000000 -0400 -+++ Clementine-1.3.1/src/analyzers/analyzerbase.cpp 2018-05-02 20:29:58.618794452 -0400 -@@ -108,7 +108,7 @@ void Analyzer::Base::paintEvent(QPaintEv ++++ Clementine-1.3.1/src/analyzers/analyzerbase.cpp 2018-05-30 02:19:53.938791531 -0400 +@@ -106,6 +106,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(x) < fht_->size(); ++x) { -+ for (uint x = 0; static_cast(x) < std::min(fht_->size(), (int)lastScope_.size()); ++x) { - lastScope_[x] = static_cast(thescope[i] + thescope[i + 1]) / - (2 * (1 << 15)); - i += 2; + for (uint x = 0; static_cast(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]; + } + diff --git a/clementine.spec b/clementine.spec index 4778587..e563714 100644 --- a/clementine.spec +++ b/clementine.spec @@ -2,7 +2,7 @@ Name: clementine Version: 1.3.1 -Release: 26%{?dist} +Release: 27%{?dist} Summary: A music player and library organizer Group: Applications/Multimedia @@ -170,6 +170,9 @@ popd %{_datadir}/kde4/services/clementine-zune.protocol %changelog +* Thu Sep 06 2018 Orcan Ogetbil 1.3.1-27 +- Improvement on the previous patch. Fixes RHBZ#1624618 + * Mon Aug 13 2018 Nicolas Chauvet - 1.3.1-26 - Rebuilt for cryptopp 7.0.0