libsidplayfp
1.5.3
Main Page
Classes
Files
Examples
File List
builders
residfp-builder
residfp
Filter.h
1
/*
2
* This file is part of libsidplayfp, a SID player engine.
3
*
4
* Copyright 2011-2013 Leandro Nini <drfiemost@users.sourceforge.net>
5
* Copyright 2007-2010 Antti Lankila
6
* Copyright 2004 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 FILTER_H
24
#define FILTER_H
25
26
namespace
reSIDfp
27
{
28
32
class
Filter
33
{
34
private
:
36
bool
enabled;
37
39
unsigned
char
filt;
40
41
protected
:
43
double
clockFrequency
;
44
46
unsigned
int
fc
;
47
49
unsigned
char
res
;
50
52
unsigned
char
vol
;
53
55
bool
filt1
, filt2, filt3, filtE;
56
58
bool
voice3off
;
59
61
bool
hp
, bp, lp;
62
63
protected
:
67
virtual
void
updatedCenterFrequency
() = 0;
68
72
virtual
void
updatedResonance
() = 0;
73
77
virtual
void
updatedMixing
() = 0;
78
79
public
:
80
Filter
() :
81
enabled(true),
82
filt(0),
83
clockFrequency
(0.),
84
fc
(0),
85
res
(0),
86
vol
(0),
87
filt1
(false),
88
filt2(false),
89
filt3(false),
90
filtE(false),
91
voice3off
(false),
92
hp
(false),
93
bp(false),
94
lp(false) {}
95
96
virtual
~
Filter
() {}
97
106
virtual
int
clock
(
int
v1,
int
v2,
int
v3) = 0;
107
113
void
enable
(
bool
enable
);
114
115
void
setClockFrequency(
double
clock
);
116
120
void
reset
();
121
127
void
writeFC_LO
(
unsigned
char
fc_lo);
128
134
void
writeFC_HI
(
unsigned
char
fc_hi);
135
141
void
writeRES_FILT
(
unsigned
char
res_filt);
142
148
void
writeMODE_VOL
(
unsigned
char
mode_vol);
149
150
virtual
void
input(
int
input) = 0;
151
};
152
153
}
// namespace reSIDfp
154
155
#endif
Generated on Wed Oct 1 2014 09:36:09 for libsidplayfp by
1.8.3.1