summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTimothy Rae <perceptualchaos2@gmail.com>2017-01-11 13:14:58 +0900
committerTimothy Rae <perceptualchaos2@gmail.com>2017-01-11 13:14:58 +0900
commit84a5954e31225ec77d6e78a2ecfd9aea611e191f (patch)
tree787c62fd083f65bd23e0345381ba3d807324c34c /lib
parent836db6a1494ae4e3cf3aea7537580a0c3d87e585 (diff)
Fix the reverb effect
The previous implementation of the reverb effect was suffering from serious artifacts in terms of feedback / distortion that the original LADSPA plugin doesn't suffer from: https://bugs.launchpad.net/mixxx/+bug/1647568 I updated the code base to use the latest version (0.9.24) from the original author (http://quitte.de/dsp/caps.html), and in doing this I disabled the unused code with preprocessor directives instead of deleting it, in order to make it easier to update in the future. Next I tried to track down where the bug was. It turns out that the `SampleUtil::linearCrossfadeBuffers()` call was causing all the feedback problems, and it seems to be safe to remove this. In the future we should use ramping on the parameters. This commit also adds the missing two controls for damping and blend, and remaps the meta knob from bandwidth to blend, which fixes the following bug: https://bugs.launchpad.net/mixxx/+bug/1647775 Note that the meaning of "blend" has changed compared to the original source code, as we use it as a "send amount" instead of wet/dry. This has the advantage that the reverb tail is not suddenly cut off when the blend knob is turned down to zero. In the PR (#1113) it was discussed that in the future we should probably implement wet/dry and send functions at the system level rather than forcing individual effects to implement it.
Diffstat (limited to 'lib')
-rw-r--r--lib/reverb/Reverb.cc313
-rw-r--r--lib/reverb/Reverb.h124
-rw-r--r--lib/reverb/basics.h54
-rw-r--r--lib/reverb/dsp/IIR1.h (renamed from lib/reverb/dsp/OnePole.h)48
-rw-r--r--lib/reverb/dsp/Sine.h39
5 files changed, 451 insertions, 127 deletions
diff --git a/lib/reverb/Reverb.cc b/lib/reverb/Reverb.cc
index 787e80a5af..c7a24e8128 100644
--- a/lib/reverb/Reverb.cc
+++ b/lib/reverb/Reverb.cc
@@ -1,10 +1,7 @@
/*
Reverb.cc
- Copyright 2002-13 Tim Goetze <tim@quitte.de>
-
- Port from LADSPA to Mixxx 2014 by Owen Williams <owilliams@mixxx.org>,
- Mostly just deleting excess code.
+ Copyright 2002-14 Tim Goetze <tim@quitte.de>
http://quitte.de/dsp/
@@ -45,7 +42,144 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA or point your web browser to http://www.gnu.org.
*/
+
+#include "basics.h"
+
#include "Reverb.h"
+//#include "Descriptor.h"
+
+#if 0
+int JVRev_length[9] = { 4199, 4999, 5399, 5801, 1051, 337, 113, 573, 487 };
+
+void
+JVRev::init()
+{
+ double s = fs/44100.;
+
+ for (int i = 0; i < 9; ++i)
+ {
+ int v = (int) (s * JVRev_length[i]);
+ v |= 1;
+ while (!DSP::isprime(v))
+ v += 2;
+ length[i] = v;
+ }
+
+ for (int i = 0; i < 4; ++i)
+ comb[i].init (length[i]);
+
+ for (int i = 0; i < 3; ++i)
+ allpass[i].init (length[i+4]);
+
+ left.init (length[7]);
+ right.init (length[8]);
+
+ /* such a simple number, yet I couldn't find a better one. */
+ apc = .7;
+}
+
+void
+JVRev::set_t60 (sample_t t)
+{
+ t60 = t;
+
+ t = max(.00001, t);
+ t = -3/(t*fs);
+
+ for (int i=0; i<4; ++i)
+ comb[i].c = pow (10, t*length[i]);
+}
+
+void
+JVRev::activate()
+{
+ bandwidth.reset();
+ tone.reset();
+
+ for (int i=0; i<3; ++i)
+ allpass[i].reset();
+
+ for (int i=0; i<4; ++i)
+ comb[i].reset();
+
+ left.reset();
+ right.reset();
+
+ set_t60(getport(1));
+ tone.set_f(1800*over_fs);
+}
+
+void
+JVRev::cycle (uint frames)
+{
+ sample_t bw = .005 + .994*getport(0);
+ bandwidth.set(exp(-M_PI*(1. - bw)));
+
+ if (t60 != *ports[1])
+ set_t60(getport(1));
+
+ double wet = getport(2);
+ wet = .38*wet*wet;
+ double dry = 1 - wet;
+
+ sample_t * s = ports[3];
+
+ sample_t * dl = ports[4];
+ sample_t * dr = ports[5];
+
+ for (uint i = 0; i < frames; ++i)
+ {
+ sample_t x = s[i], a = x + normal;
+
+ a = bandwidth.process(a);
+ x *= dry;
+
+ /* diffusors */
+ a = allpass[0].process(a,-apc);
+ a = allpass[1].process(a,-apc);
+ a = allpass[2].process(a,-apc);
+
+ /* tank */
+ sample_t t = 0;
+ a -= normal;
+
+ for (int j=0; j<4; ++j)
+ t += comb[j].process(a);
+
+ t = tone.process(t);
+
+ dl[i] = x + wet*left.putget(t);
+ dr[i] = x + wet*right.putget(t);
+ }
+}
+
+/* //////////////////////////////////////////////////////////////////////// */
+
+PortInfo
+JVRev::port_info [] =
+{
+ { "bandwidth", INPUT | CONTROL, {DEFAULT_MID, 0, 1} },
+ { "t60 (s)", INPUT | CONTROL | GROUP, {DEFAULT_MID, 0, 5.6} },
+ { "blend", INPUT | CONTROL, {DEFAULT_LOW, 0, 1} },
+
+ { "in", INPUT | AUDIO },
+ { "out.l", OUTPUT | AUDIO },
+ { "out.r", OUTPUT | AUDIO }
+};
+
+template <> void
+Descriptor<JVRev>::setup()
+{
+ Label = "JVRev";
+
+ Name = CAPS "JVRev - Stanford-style reverb from STK";
+ Maker = "Tim Goetze <tim@quitte.de>";
+ Copyright = "2004-12";
+
+ /* fill port info and vtable */
+ autogen();
+}
+#endif
/* //////////////////////////////////////////////////////////////////////// */
@@ -53,8 +187,6 @@ void
PlateStub::init()
{
f_lfo = -1;
- // TODO(owilliams): use actual sample rate.
- fs = 44100;
# define L(i) ((int) (l[i] * fs))
static float l[] = {
@@ -159,3 +291,172 @@ PlateStub::process (sample_t x, sample_t decay, sample_t * _xl, sample_t * _xr)
*_xl = xl;
*_xr = xr;
}
+
+/* //////////////////////////////////////////////////////////////////////// */
+#if 0
+void
+Plate::cycle (uint frames)
+{
+ sample_t bw = .005 + .994*getport(0);
+ input.bandwidth.set (exp (-M_PI * (1. - bw)));
+
+ sample_t decay = .749*getport(1);
+
+ double damp = exp (-M_PI * (.0005+.9995*getport(2)));
+ tank.damping[0].set (damp);
+ tank.damping[1].set (damp);
+
+ sample_t blend = getport(3);
+ blend = pow (blend, 1.6); /* linear is not a good choice for this pot */
+ sample_t dry = 1 - blend;
+
+ sample_t * s = ports[4];
+
+ sample_t * dl = ports[5];
+ sample_t * dr = ports[6];
+
+ /* modulated lattice interpolation needs float truncation */
+ DSP::FPTruncateMode _truncate;
+
+ for (uint i = 0; i < frames; ++i)
+ {
+ normal = -normal;
+ sample_t x = s[i] + normal;
+
+ sample_t xl, xr;
+
+ PlateStub::process (x, decay, &xl, &xr);
+
+ x = dry * s[i];
+
+ dl[i] = x + blend*xl;
+ dr[i] = x + blend*xr;
+ }
+}
+
+/* //////////////////////////////////////////////////////////////////////// */
+
+PortInfo
+Plate::port_info [] =
+{
+ {"bandwidth", INPUT | CONTROL, {DEFAULT_HIGH, 0, 1} /* .9995 */ },
+ {"tail", INPUT | CONTROL | GROUP, {DEFAULT_MID, 0, 1} /* .5 */ },
+ {"damping", INPUT | CONTROL, {DEFAULT_LOW, 0, 1} /* .0005 */ },
+ {"blend", INPUT | CONTROL | GROUP, {DEFAULT_LOW, 0, 1} },
+
+ {"in", INPUT | AUDIO},
+ {"out.l", OUTPUT | AUDIO},
+ {"out.r", OUTPUT | AUDIO}
+};
+
+template <> void
+Descriptor<Plate>::setup()
+{
+ Label = "Plate";
+
+ Name = CAPS "Plate - Versatile plate reverb";
+ Maker = "Tim Goetze <tim@quitte.de>";
+ Copyright = "2004-11";
+
+ /* fill port info and vtable */
+ autogen();
+}
+
+/* //////////////////////////////////////////////////////////////////////// */
+
+void
+PlateX2::cycle (uint frames)
+{
+ sample_t bw = .005 + .994*getport(0);
+ input.bandwidth.set (exp (-M_PI * (1. - bw)));
+
+ sample_t decay = .749*getport(1);
+
+ double damp = exp (-M_PI * (.0005+.9995*getport(2)));
+ tank.damping[0].set (damp);
+ tank.damping[1].set (damp);
+
+ sample_t blend = getport(3);
+ blend = pow (blend, 1.53);
+ sample_t dry = 1 - blend;
+
+ sample_t * sl = ports[4];
+ sample_t * sr = ports[5];
+ sample_t * dl = ports[6];
+ sample_t * dr = ports[7];
+
+ /* the modulated lattices interpolate, which needs truncated float */
+ DSP::FPTruncateMode _truncate;
+
+ for (uint i = 0; i < frames; ++i)
+ {
+ normal = -normal;
+ sample_t x = (sl[i] + sr[i] + normal) * .5;
+
+ sample_t xl, xr;
+ PlateStub::process (x, decay, &xl, &xr);
+
+ dl[i] = blend*xl + dry*sl[i];
+ dr[i] = blend*xr + dry*sr[i];
+ }
+}
+
+/* //////////////////////////////////////////////////////////////////////// */
+PortInfo
+PlateX2::port_info [] =
+{
+ {"bandwidth", INPUT | CONTROL, {DEFAULT_HIGH, 0, 1} /* .9995 */ },
+ {"tail", INPUT | CONTROL | GROUP, {DEFAULT_MID, 0, 1} /* .5 */ },
+ {"damping", INPUT | CONTROL, {DEFAULT_LOW, 0, 1} /* .0005 */ },
+ {"blend", INPUT | CONTROL | GROUP, {DEFAULT_LOW, 0, 1} },
+
+ {"in.l", INPUT | AUDIO},
+ {"in.r", INPUT | AUDIO},
+ {"out.l", OUTPUT | AUDIO},
+ {"out.r", OUTPUT | AUDIO}
+};
+
+template <> void
+Descriptor<PlateX2>::setup()
+{
+ Label = "PlateX2";
+
+ Name = CAPS "PlateX2 - Versatile plate reverb, stereo inputs";
+ Maker = "Tim Goetze <tim@quitte.de>";
+ Copyright = "2004-11";
+
+ /* fill port info and vtable */
+ autogen();
+}
+#endif
+
+
+
+// (timrae) we have our left / right samples interleaved in the same array, so use slightly modified version of PlateX2::cycle
+void MixxxPlateX2::processBuffer(const sample_t* in, sample_t* out, const uint frames, const sample_t bandwidthParam,
+ const sample_t decayParam, const sample_t dampingParam, const sample_t blendParam) {
+ // set bandwidth
+ input.bandwidth.set(exp(-M_PI * (1. - (.005 + .994*bandwidthParam))));
+ // set decay
+ sample_t decay = .749*decayParam;
+ // set damping
+ double damp = exp(-M_PI * (.0005+.9995*dampingParam));
+ tank.damping[0].set(damp);
+ tank.damping[1].set(damp);
+ // set blend
+ sample_t blend = pow(blendParam, 1.53);
+ sample_t dry = 1 - blend;
+
+ // the modulated lattices interpolate, which needs truncated float
+ DSP::FPTruncateMode _truncate;
+
+ // loop through the buffer, processing each sample
+ // note (timrae):treat the effect as SEND type instead of INSERT type for smoother parameter changes
+ for (uint i = 0; i + 1 < frames; i += 2) {
+ sample_t mono_sample = blend*(in[i] + in[i + 1]) / 2;
+ sample_t xl, xr;
+ PlateStub::process(mono_sample, decay, &xl, &xr);
+ out[i] = xl + dry*in[i];
+ out[i + 1] = xr + dry*in[i + 1];
+ }
+}
diff --git a/lib/reverb/Reverb.h b/lib/reverb/Reverb.h
index 5a341e6835..ae9591905f 100644
--- a/lib/reverb/Reverb.h
+++ b/lib/reverb/Reverb.h
@@ -44,14 +44,14 @@
02111-1307, USA or point your web browser to http://www.gnu.org.
*/
-#ifndef _REVERB_H_
-#define _REVERB_H_
+#ifndef REVERB_H
+#define REVERB_H
#include <stdio.h>
#include "basics.h"
#include "dsp/Delay.h"
-#include "dsp/OnePole.h"
+#include "dsp/IIR1.h"
#include "dsp/Sine.h"
#include "dsp/util.h"
@@ -60,16 +60,59 @@ class Lattice
: public DSP::Delay
{
public:
- inline sample_t
- process (sample_t x, double d)
+ sample_t process (sample_t x, double d)
{
sample_t y = get();
- x -= d * y;
- put (x);
- return d * x + y;
+ x -= d*y;
+ put(x);
+ return d*x + y;
}
};
+/* helper for JVRev */
+#if 0
+class JVComb
+: public DSP::Delay
+{
+ public:
+ float c;
+
+ sample_t process (sample_t x)
+ {
+ x += c*get();
+ put(x);
+ return x;
+ }
+};
+
+class JVRev
+: public Plugin
+{
+ public:
+ DSP::LP1<sample_t> bandwidth, tone;
+
+ sample_t t60;
+
+ int length[9];
+
+ Lattice allpass[3];
+ JVComb comb[4];
+
+ DSP::Delay left, right;
+
+ double apc;
+
+ void cycle (uint frames);
+
+ void set_t60 (sample_t t);
+
+ public:
+ static PortInfo port_info [];
+
+ void init();
+ void activate();
+};
+#endif
/* /////////////////////////////////////////////////////////////////////// */
class ModLattice
@@ -103,14 +146,14 @@ class ModLattice
};
class PlateStub
+
{
public:
sample_t f_lfo;
-
sample_t indiff1, indiff2, dediff1, dediff2;
struct {
- DSP::OnePoleLP<sample_t> bandwidth;
+ DSP::LP1<sample_t> bandwidth;
Lattice lattice[4];
} input;
@@ -118,7 +161,7 @@ class PlateStub
ModLattice mlattice[2];
Lattice lattice[2];
DSP::Delay delay[4];
- DSP::OnePoleLP<sample_t> damping[2];
+ DSP::LP1<sample_t> damping[2];
int taps[12];
} tank;
@@ -145,30 +188,49 @@ class PlateStub
tank.mlattice[1].lfo.set_f (1.2, fs, .5 * M_PI);
}
- // Process a single mono sample, returning a left and right reverbed
- // sample.
void process (sample_t x, sample_t decay,
- sample_t * xl, sample_t * xr);
+ sample_t * xl, sample_t * xr);
+ protected:
+ float fs = 44100; // (timrae) define sample rate
+};
+
+/* /////////////////////////////////////////////////////////////////////// */
+/// (timrae) Disable the default classes as we use our own interface for Mixxx
+#if 0
+class Plate
+: public PlateStub
+{
+ public:
+ void cycle (uint frames);
- private:
- float fs; // sameple rate;
+ public:
+ static PortInfo port_info [];
+};
+
+/* /////////////////////////////////////////////////////////////////////// */
+
+class PlateX2
+: public PlateStub
+{
+ public:
+ void cycle (uint frames);
+
+ public:
+ static PortInfo port_info [];
};
+#endif
+/// (timrae) Define our own interface instead of using the original LADSPA plugin interface
class MixxxPlateX2 : public PlateStub {
- public:
- void setBandwidth(double bandwidth) {
- input.bandwidth.set(exp(-M_PI * (1. - bandwidth)));
- }
-
- void setDecay(double decay_control) {
- double damp = exp(-M_PI * decay_control);
- tank.damping[0].set(damp);
- tank.damping[1].set(damp);
- }
-
- void process(sample_t x, sample_t decay, sample_t * xl, sample_t * xr) {
- PlateStub::process(x, decay, xl, xr);
- }
+ public:
+ void processBuffer(const sample_t* in, sample_t* out, const uint frames, const sample_t bandwidthParam,
+ const sample_t decayParam, const sample_t dampingParam, const sample_t blendParam);
+
+ void init(float sampleRate) {
+ fs = sampleRate;
+ PlateStub::init();
+ PlateStub::activate();
+ }
};
-#endif /* _REVERB_H_ */
+#endif /* REVERB_H */
diff --git a/lib/reverb/basics.h b/lib/reverb/basics.h
index 36275ae796..8fe92b68fa 100644
--- a/lib/reverb/basics.h
+++ b/lib/reverb/basics.h
@@ -29,8 +29,8 @@
02111-1307, USA or point your web browser to http://www.gnu.org.
*/
-#ifndef _BASICS_H_
-#define _BASICS_H_
+#ifndef BASICS_H
+#define BASICS_H
// NOTE(rryan): 3/2014 Added for MSVC support. (missing M_PI)
#define _USE_MATH_DEFINES
@@ -59,9 +59,9 @@ typedef quint32 uint32;
typedef qint64 int64;
typedef quint64 uint64;
-#define MIN_GAIN .000001 /* -120 dB */
+#define MIN_GAIN 1e-6 /* -120 dB */
/* smallest non-denormal 32 bit IEEE float is 1.18e-38 */
-#define NOISE_FLOOR .00000000000005 /* -266 dB */
+#define NOISE_FLOOR 1e-20 /* -400 dB */
/* //////////////////////////////////////////////////////////////////////// */
@@ -71,29 +71,9 @@ typedef unsigned long ulong;
/* prototype that takes a sample and yields a sample */
typedef CSAMPLE (*clip_func_t) (CSAMPLE);
-/* flavours for sample store functions run() and run_adding() */
-typedef void (*yield_func_t) (CSAMPLE *, uint, CSAMPLE, CSAMPLE);
-
-inline void
-adding_func (CSAMPLE * s, uint i, CSAMPLE x, CSAMPLE gain)
-{
- s[i] += gain * x;
-}
-
#ifndef max
-
-template <class X, class Y>
-X min (X x, Y y)
-{
- return x < y ? x : (X) y;
-}
-
-template <class X, class Y>
-X max (X x, Y y)
-{
- return x > y ? x : (X) y;
-}
-
+template <class X, class Y> X min (X x, Y y) { return x < (X)y ? x : (X)y; }
+template <class X, class Y> X max (X x, Y y) { return x > (X)y ? x : (X)y; }
#endif /* ! max */
template <class T>
@@ -104,11 +84,8 @@ T clamp (T value, T lower, T upper)
return value;
}
-static inline float
-frandom()
-{
- return (float) rand() / (float) RAND_MAX;
-}
+// (timrae) change random() to rand() for MSVC support
+static inline float frandom() { return (float) rand() / (float) RAND_MAX; }
/* NB: also true if 0 */
inline bool
@@ -144,18 +121,9 @@ next_power_of_2 (uint n)
return ++n;
}
-inline double
-db2lin (double db)
-{
- return pow(10, db*.05);
-}
-
-inline double
-lin2db (double lin)
-{
- return 20*log10(lin);
-}
+inline double db2lin (double db) { return pow(10, .05*db); }
+inline double lin2db (double lin) { return 20*log10(lin); }
/* //////////////////////////////////////////////////////////////////////// */
-#endif /* _BASICS_H_ */
+#endif /* BASICS_H */
diff --git a/lib/reverb/dsp/OnePole.h b/lib/reverb/dsp/IIR1.h
index 95262f9dc8..0d945b3ffc 100644
--- a/lib/reverb/dsp/OnePole.h
+++ b/lib/reverb/dsp/IIR1.h
@@ -1,11 +1,11 @@
/*
dsp/OnePole.h
-
- Copyright 2003-13 Tim Goetze <tim@quitte.de>
-
+
+ Copyright 2003-14 Tim Goetze <tim@quitte.de>
+
http://quitte.de/dsp/
- one pole (or one zero, or one zero, one pole) hi- and lo-pass filters.
+ first-order IIR hi- and lo-pass filters.
*/
/*
@@ -25,63 +25,59 @@
02111-1307, USA or point your web browser to http://www.gnu.org.
*/
-#ifndef _ONE_POLE_H_
-#define _ONE_POLE_H_
+#ifndef IIR1_H
+#define IIR1_H
namespace DSP {
-
+
template <class T>
-class OnePoleLP
+class LP1
{
public:
T a0, b1, y1;
- OnePoleLP (double d = 1.)
+ LP1 (double d = 1.)
{
set (d);
y1 = 0.;
}
- inline void reset()
+ sample_t last() {return y1;}
+ inline void reset() { y1 = 0.; }
+
+ inline void decay (T d)
{
- y1 = 0.;
+ a0 *= d;
+ b1 = 1. - a0;
}
inline void set_f (T fc)
{
set (1 - exp(-2*M_PI*fc));
}
-
inline void set (T d)
{
a0 = d;
b1 = 1 - d;
}
- inline T process (T x)
- {
- return y1 = a0*x + b1*y1;
- }
-
- inline void decay (T d)
- {
- a0 *= d;
- b1 = 1. - a0;
- }
+ inline T process (T x) { return y1 = a0*x + b1*y1; }
};
template <class T>
-class OnePoleHP
+class HP1
{
public:
T a0, a1, b1, x1, y1;
- OnePoleHP (T d = 1.)
+ HP1 (T d = 1.)
{
set (d);
- x1 = y1 = 0.;
+ reset();
}
+ sample_t last() {return y1;}
+
void set_f (T f)
{
set (exp (-2*M_PI*f));
@@ -115,4 +111,4 @@ class OnePoleHP
} /* namespace DSP */
-#endif /* _ONE_POLE_H_ */
+#endif /* IIR1 */
diff --git a/lib/reverb/dsp/Sine.h b/lib/reverb/dsp/Sine.h
index 86c3a47c3b..93ef2cdf00 100644
--- a/lib/reverb/dsp/Sine.h
+++ b/lib/reverb/dsp/Sine.h
@@ -1,11 +1,11 @@
/*
dsp/Sine.h
-
- Copyright 2003-13 Tim Goetze <tim@quitte.de>
-
+
+ Copyright 2003-14 Tim Goetze <tim@quitte.de>
+
http://quitte.de/dsp/
- Direct form I recursive sin() generator. Utilising doubles
+ Direct form I recursive sin() generator. Utilising doubles
for stability.
*/
@@ -26,11 +26,11 @@
02111-1307, USA or point your web browser to http://www.gnu.org.
*/
-#ifndef _DSP_SINE_H_
-#define _DSP_SINE_H_
+#ifndef DSP_SINE_H
+#define DSP_SINE_H
namespace DSP {
-
+
class Sine
{
public:
@@ -40,7 +40,7 @@ class Sine
public:
Sine()
- {
+ {
b = 0;
y[0] = y[1] = 0;
z = 0;
@@ -63,16 +63,16 @@ class Sine
inline void set_f (double w, double phase)
{
- b = 2 * cos (w);
+ b = 2*cos(w);
y[0] = sin (phase - w);
- y[1] = sin (phase - w * 2);
+ y[1] = sin (phase - 2*w);
z = 0;
}
/* advance and return 1 sample */
inline double get()
{
- register double s = b * y[z];
+ register double s = b*y[z];
z ^= 1;
s -= y[z];
return y[z] = s;
@@ -80,14 +80,11 @@ class Sine
double get_phase()
{
- double x0 = y[z], x1 = b * y[z] - y[z^1];
- double phi = asin (x0);
-
- /* slope is falling, we're into the 2nd half. */
- if (x1 < x0)
- return M_PI - phi;
-
- return phi;
+ double x0 = y[z], x1 = b*y[z] - y[z^1];
+ double phi = asin(x0);
+
+ /* slope is falling: into the 2nd half. */
+ return x1 < x0 ? M_PI - phi : phi;
}
};
@@ -104,7 +101,7 @@ class DampedSine
inline double get()
{
- register double s = b * y[z];
+ register double s = b * y[z];
z ^= 1;
s -= d * y[z];
return y[z] = d * s;
@@ -113,4 +110,4 @@ class DampedSine
} /* namespace DSP */
-#endif /* _DSP_SINE_H_ */
+#endif /* DSP_SINE_H */