float
ARDOUR::DSP::log_meter (float power) {
- // compare to gtk2_ardour/logmeter.h
+ // compare to libs/ardour/log_meter.h
static const float lower_db = -192.f;
static const float upper_db = 0.f;
static const float non_linearity = 8.0;
void
Biquad::compute (Type type, double freq, double Q, double gain)
{
- if (Q <= .001) { Q = 0.001; }
- if (freq <= 1.) { freq = 1.; }
- if (freq >= _rate) { freq = _rate; }
+ if (Q <= .001) { Q = 0.001; }
+ if (freq <= 1.) { freq = 1.; }
+ if (freq >= 0.4998 * _rate) { freq = 0.4998 * _rate; }
/* Compute biquad filter settings.
* Based on 'Cookbook formulae for audio EQ biquad filter coefficents'
void
FFTSpectrum::init (uint32_t window_size, double rate)
{
+ assert (window_size > 0);
Glib::Threads::Mutex::Lock lk (fft_planner_lock);
_fft_window_size = window_size;