all repos — la-ninpre-overlay @ 722563895cae913b94f392acf25aae3cfcf2731f

personal gentoo overlay

media-libs/eq10q/files/eq10q-2.2-pow10.patch (view raw)

 1--- a/gui/widgets/bandctl.cpp
 2+++ b/gui/widgets/bandctl.cpp
 3@@ -949,7 +949,7 @@ bool BandCtl::parseBtnString(BandCtl::Button* btn)
 4   if(str_k.length() > 0)
 5   {
 6     val_k = atof(str_k.c_str()) * 1e3;
 7-    val *= pow10(3.0 - str.length());
 8+    val *= exp10(3.0 - str.length());
 9     if(str.length() > 3)
10     {
11       //throw an error, imposible to match str > 3 with k
12@@ -960,7 +960,7 @@ bool BandCtl::parseBtnString(BandCtl::Button* btn)
13   }
14   if(str_d.length() > 0)
15   {
16-    val_d = atof(str_d.c_str())/ pow10((double)str_d.length());
17+    val_d = atof(str_d.c_str())/ exp10((double)str_d.length());
18   }
19    
20   btn->value = val + val_k + val_d;
21--- a/gui/widgets/bodeplot.cpp
22+++ b/gui/widgets/bodeplot.cpp
23@@ -194,14 +194,14 @@ void PlotEQCurve::resetCenterSpan()
24 {
25   //Compute center and span for the full range spectrum
26   double sp = log10(MAX_FREQ/MIN_FREQ);
27-  double cn = MIN_FREQ * sqrt(pow10(sp));
28+  double cn = MIN_FREQ * sqrt(exp10(sp));
29   setCenterSpan(cn, sp);
30 }
31 
32 void PlotEQCurve::setCenterSpan(double center, double span)
33 { 
34-  m_minFreq = center / sqrt(pow10(span));
35-  m_maxFreq = center * sqrt(pow10(span));
36+  m_minFreq = center / sqrt(exp10(span));
37+  m_maxFreq = center * sqrt(exp10(span));
38     
39   //Initalize the grid
40   const double f_grid[GRID_VERTICAL_LINES] = {20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0,
41@@ -246,8 +246,8 @@ void PlotEQCurve::setCenter(double center)
42 {
43   //Limit center to the possible range according the current span
44   double sp = log10(m_maxFreq/m_minFreq);
45-  double cmin = MIN_FREQ * sqrt(pow10(sp));
46-  double cmax = MAX_FREQ / sqrt(pow10(sp));
47+  double cmin = MIN_FREQ * sqrt(exp10(sp));
48+  double cmax = MAX_FREQ / sqrt(exp10(sp));
49   
50   double cn = center;
51   cn = cn > cmax ? cmax : cn;
52@@ -259,7 +259,7 @@ void PlotEQCurve::setSpan(double span)
53 {
54   //Limit center to the possible range according the current span
55   double sp_act = log10(m_maxFreq/m_minFreq);
56-  double cn = m_minFreq * sqrt(pow10(sp_act));
57+  double cn = m_minFreq * sqrt(exp10(sp_act));
58   double smax1 = 2.0*log10(cn/MIN_FREQ);
59   double smax2= 2.0*log10(MAX_FREQ/cn);
60   double smax = smax1 < smax2 ? smax1 : smax2;
61@@ -306,7 +306,7 @@ void PlotEQCurve::recomputeCenterFreq(double xDiff)
62   double fmax = MIN_FREQ*pow((MAX_FREQ/MIN_FREQ),((local_x2 + 3.5)/((double)m_zoom_surface_ptr->get_width())));
63   
64   double sp_act = log10(fmax/fmin);
65-  double cn = fmin * sqrt(pow10(sp_act));
66+  double cn = fmin * sqrt(exp10(sp_act));
67   setCenter(cn);
68 }
69