libsidplayfp 2.15.0
Filter6581.h
1/*
2 * This file is part of libsidplayfp, a SID player engine.
3 *
4 * Copyright 2011-2024 Leandro Nini <drfiemost@users.sourceforge.net>
5 * Copyright 2007-2010 Antti Lankila
6 * Copyright 2004,2010 Dag Lem <resid@nimrod.no>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 */
22
23#ifndef FILTER6581_H
24#define FILTER6581_H
25
26#include "Filter.h"
27#include "FilterModelConfig6581.h"
28#include "Integrator6581.h"
29
30#include "sidcxx11.h"
31
32namespace reSIDfp
33{
34
35class Integrator6581;
36
320class Filter6581 final : public Filter
321{
322private:
324 Integrator6581 hpIntegrator;
325
327 Integrator6581 bpIntegrator;
328
329 const unsigned short* f0_dac;
330
331protected:
335 void updateCenterFrequency() override;
336
337 int solveIntegrators() override;
338
339public:
340 Filter6581() :
341 Filter(*FilterModelConfig6581::getInstance()),
342 hpIntegrator(*FilterModelConfig6581::getInstance()),
343 bpIntegrator(*FilterModelConfig6581::getInstance()),
344 f0_dac(FilterModelConfig6581::getInstance()->getDAC(0.5))
345 {}
346
347 ~Filter6581() override;
348
355 void setFilterCurve(double curvePosition);
356
363 void setFilterRange(double adjustment);
364};
365
366} // namespace reSIDfp
367
368#endif
Definition Filter6581.h:321
void setFilterCurve(double curvePosition)
Definition Filter6581.cpp:58
void setFilterRange(double adjustment)
Definition Filter6581.cpp:65
void updateCenterFrequency() override
Definition Filter6581.cpp:51
Definition Filter.h:38
Definition Integrator6581.h:165