[audacity] Add upstream patch to avoid segfault when starting Effects|Equalization
David Timms
dtimms at fedoraproject.org
Sun Sep 22 13:19:47 UTC 2013
commit 8467b47b32cef0e8cfef34159863fbf0705ff47e
Author: David Timms <dtimms at iinet.net.au>
Date: Sun Sep 22 23:18:38 2013 +1000
Add upstream patch to avoid segfault when starting Effects|Equalization
audacity-2.0.4-equalization-segfault.patch | 50 ++++++++++++++++++++++++++++
1 files changed, 50 insertions(+), 0 deletions(-)
---
diff --git a/audacity-2.0.4-equalization-segfault.patch b/audacity-2.0.4-equalization-segfault.patch
new file mode 100644
index 0000000..fb75c3d
--- /dev/null
+++ b/audacity-2.0.4-equalization-segfault.patch
@@ -0,0 +1,50 @@
+--- src/effects/Equalization.cpp.orig 2013-09-01 08:03:13.000000000 +1000
++++ src/effects/Equalization.cpp 2013-09-22 13:07:32.979172233 +1000
+@@ -1195,10 +1195,8 @@
+
+ szrG = new wxBoxSizer( wxHORIZONTAL );
+ szrG->Add(0, 0, 0); // horizontal spacer, will be used to position LH EQ slider
+- for (int i = 0; thirdOct[i] <= mHiFreq; ++i)
++ for (int i = 0; (i < NUMBER_OF_BANDS) && (thirdOct[i] <= mHiFreq); ++i)
+ {
+- if( i == NUMBER_OF_BANDS )
+- break;
+ m_sliders[i] = new wxSliderBugfix(this, ID_SLIDER + i, 0, -20, +20,
+ wxDefaultPosition, wxSize(20, 124), wxSL_VERTICAL|
+ wxSL_INVERSE);
+@@ -1965,10 +1963,8 @@
+ void EqualizationDialog::OnSlider(wxCommandEvent & event)
+ {
+ wxSliderBugfix *s = (wxSliderBugfix *)event.GetEventObject();
+- for (int i = 0; thirdOct[i] <= mHiFreq; ++i)
++ for (int i = 0; (i < NUMBER_OF_BANDS) && (thirdOct[i] <= mHiFreq); ++i)
+ {
+- if( i == NUMBER_OF_BANDS )
+- break;
+ if( s == m_sliders[i])
+ {
+ int posn = m_sliders[i]->GetValue();
+@@ -2041,10 +2037,8 @@
+ double loLog = log10(mLoFreq);
+ double hiLog = log10(mHiFreq);
+ double denom = hiLog - loLog;
+- for (int i = 1; thirdOct[i] <= mHiFreq; ++i) //go along the spacers
++ for (int i = 1; (i < NUMBER_OF_BANDS) && (thirdOct[i] <= mHiFreq); ++i) //go along the spacers
+ {
+- if( i == NUMBER_OF_BANDS )
+- break;
+ float posn = range*(log10(thirdOct[i])-loLog)/denom; //centre of this slider, from start
+ w = start + ((int)(posn+.5)) - EQsliderSize.x/2; //LH edge of slider, from 0
+ w = w - so_far; //gap needed to put it here
+@@ -2618,10 +2612,8 @@
+ {
+ if(!drawMode) // Graphic (Slider) mode. Invert the sliders.
+ {
+- for (int i = 0; thirdOct[i] <= mHiFreq; ++i)
++ for (int i = 0; (i < NUMBER_OF_BANDS) && (thirdOct[i] <= mHiFreq); ++i)
+ {
+- if( i == NUMBER_OF_BANDS )
+- break;
+ m_EQVals[i] = -m_EQVals[i];
+ int newPosn = (int)m_EQVals[i];
+ m_sliders[i]->SetValue( newPosn );
More information about the scm-commits
mailing list