projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make copies of global lists before extending
[ardour.git]
/
libs
/
ardour
/
vumeterdsp.cc
diff --git
a/libs/ardour/vumeterdsp.cc
b/libs/ardour/vumeterdsp.cc
index 67d48f6c5411859b5166f5f5b470402370fb3d30..edd9fa58316fcc66eaa5741398dcbce8b1b76712 100644
(file)
--- a/
libs/ardour/vumeterdsp.cc
+++ b/
libs/ardour/vumeterdsp.cc
@@
-39,12
+39,12
@@
Vumeterdsp::~Vumeterdsp (void)
}
}
-void Vumeterdsp::process (float *p, int n)
+void Vumeterdsp::process (float
const
*p, int n)
{
float z1, z2, m, t1, t2;
{
float z1, z2, m, t1, t2;
- z1 = _z1;
- z2 = _z2;
+ z1 = _z1
> 20 ? 20 : (_z1 < -20 ? -20 : _z1)
;
+ z2 = _z2
> 20 ? 20 : (_z2 < -20 ? -20 : _z2)
;
m = _res ? 0: _m;
_res = false;
m = _res ? 0: _m;
_res = false;
@@
-64,6
+64,8
@@
void Vumeterdsp::process (float *p, int n)
if (z2 > m) m = z2;
}
if (z2 > m) m = z2;
}
+ if (isnan(z1)) z1 = 0;
+ if (isnan(z2)) z2 = 0;
_z1 = z1;
_z2 = z2 + 1e-10f;
_m = m;
_z1 = z1;
_z2 = z2 + 1e-10f;
_m = m;
@@
-84,6
+86,6
@@
void Vumeterdsp::reset ()
void Vumeterdsp::init (float fsamp)
{
void Vumeterdsp::init (float fsamp)
{
- _w = 11.1f / fsamp;
+ _w = 11.1f / fsamp;
_g = 1.5f * 1.571f;
}
_g = 1.5f * 1.571f;
}