Debian Codegraph @

src/resid-fp/sidfp.h

raw symbols SCIP
1 // ---------------------------------------------------------------------------cxx . . $ `<file>/src/resid-fp/sidfp.h`/
2 // This file is part of reSID, a MOS6581 SID emulator engine.
3 // Copyright (C) 2004 Dag Lem <[email protected]>
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // ---------------------------------------------------------------------------
19
20 #ifndef __SIDFP_H__
21 #define __SIDFP_H__cxx . . $ `src/resid-fp/sidfp.h:21:9`!
22
23 #include "siddefsfp.h"cxx . . $ `<file>/src/resid-fp/siddefsfp.h`/
24 #include "voicefp.h"cxx . . $ `<file>/src/resid-fp/voicefp.h`/
25 #include "filterfp.h"cxx . . $ `<file>/src/resid-fp/filterfp.h`/
26 #include "extfiltfp.h"cxx . . $ `<file>/src/resid-fp/extfiltfp.h`/
27 #include "potfp.h"cxx . . $ `<file>/src/resid-fp/potfp.h`/
28
29 class SIDFPcxx . . $ SIDFP#
30 {
31 public:
32 SIDFPcxx . . $ SIDFP#SIDFP(49f6e7a06ebc5aa8).();
33 ~cxx . . $ SIDFP#`~SIDFP`(49f6e7a06ebc5aa8).SIDFPcxx . . $ SIDFP#();
34
35 static float kinked_daccxx . . $ SIDFP#kinked_dac(7555465bc4331e8c).(const int x, const float nonlinearity, const int bits);
36
37 void set_chip_modelcxx . . $ SIDFP#set_chip_model(cea143c94d31b99f).(chip_modelcxx . . $ chip_model# model);
38 FilterFPcxx . . $ FilterFP#& get_filtercxx . . $ SIDFP#get_filter(b2e2d83b865a240b).() { return filtercxx . . $ SIDFP#filter.; }
39 void enable_filtercxx . . $ SIDFP#enable_filter(b45ddcbc8423892c).(bool enable);
40 bool set_sampling_parameterscxx . . $ SIDFP#set_sampling_parameters(9b00e6c4292bcdca).(double clock_freq, sampling_methodcxx . . $ sampling_method# method,
41 double sample_freq, double pass_freq = 20000);
42 void set_voice_nonlinearitycxx . . $ SIDFP#set_voice_nonlinearity(9364e6e7bff7660).(float nl);
43
44 void clockcxx . . $ SIDFP#clock(49f6e7a06ebc5aa8).();
45 int clockcxx . . $ SIDFP#clock(1a782d52ea0fd1a5).(cycle_countcxx . . $ cycle_count#& delta_t, short* buf, int n, int interleave = 1);
46 int clock_fastcxx . . $ SIDFP#clock_fast(1a782d52ea0fd1a5).(cycle_countcxx . . $ cycle_count#& delta_t, short* buf, int n, int interleave = 1);
47 void resetcxx . . $ SIDFP#reset(49f6e7a06ebc5aa8).();
48
49 // Read/write registers.
50 reg8cxx . . $ reg8# readcxx . . $ SIDFP#read(2141b656ce2cc063).(reg8cxx . . $ reg8# offset);
51 void writecxx . . $ SIDFP#write(b4d55b1286ff73e8).(reg8cxx . . $ reg8# offset, reg8cxx . . $ reg8# value);
52 void mutecxx . . $ SIDFP#mute(ee2069353d7cc01f).(reg8cxx . . $ reg8# channel, bool enable);
53
54 // 16-bit input (EXT IN).
55 void inputcxx . . $ SIDFP#input(d4f767463ce0a6b3).(int sample);
56
57 // 16-bit output (AUDIO OUT).
58 float outputcxx . . $ SIDFP#output(9b8c9e39889c762c).();
59
60 // Ring buffer with overflow for contiguous storage of RINGSIZE samples.
61 float* samplecxx . . $ SIDFP#sample.;
62
63 private:
64 static double I0cxx . . $ SIDFP#I0(447c67c6676f75c3).(double x);
65 inline int clock_interpolatecxx . . $ SIDFP#clock_interpolate(1a782d52ea0fd1a5).(cycle_countcxx . . $ cycle_count#& delta_t, short* buf, int n,
66 int interleave);
67 inline int clock_resample_interpolatecxx . . $ SIDFP#clock_resample_interpolate(1a782d52ea0fd1a5).(cycle_countcxx . . $ cycle_count#& delta_t, short* buf,
68 int n, int interleave);
69 inline void age_bus_valuecxx . . $ SIDFP#age_bus_value(d4f767463ce0a6b3).(cycle_countcxx . . $ cycle_count#);
70
71 VoiceFPcxx . . $ VoiceFP# voicecxx . . $ SIDFP#voice.[3];
72 FilterFPcxx . . $ FilterFP# filtercxx . . $ SIDFP#filter.;
73 ExternalFilterFPcxx . . $ ExternalFilterFP# extfiltcxx . . $ SIDFP#extfilt.;
74 PotentiometerFPcxx . . $ PotentiometerFP# potxcxx . . $ SIDFP#potx.;
75 PotentiometerFPcxx . . $ PotentiometerFP# potycxx . . $ SIDFP#poty.;
76
77 reg8cxx . . $ reg8# bus_valuecxx . . $ SIDFP#bus_value.;
78 cycle_countcxx . . $ cycle_count# bus_value_ttlcxx . . $ SIDFP#bus_value_ttl.;
79
80 // External audio input.
81 float ext_incxx . . $ SIDFP#ext_in.;
82
83 // Sampling variables.
84 sampling_methodcxx . . $ sampling_method# samplingcxx . . $ SIDFP#sampling.;
85 float cycles_per_samplecxx . . $ SIDFP#cycles_per_sample.;
86 float sample_offsetcxx . . $ SIDFP#sample_offset.;
87 int sample_indexcxx . . $ SIDFP#sample_index.;
88 int fir_Ncxx . . $ SIDFP#fir_N.;
89 int fir_REScxx . . $ SIDFP#fir_RES.;
90 /* for linear interpolation mode */
91 float sample_prevcxx . . $ SIDFP#sample_prev.;
92
93 // FIR_RES filter tables (FIR_N*FIR_RES).
94 float* fircxx . . $ SIDFP#fir.;
95
96 /* analog parts are run at half the rate of digital ones. */
97 float lastsamplecxx . . $ SIDFP#lastsample.[3];
98 unsigned char filtercyclegatecxx . . $ SIDFP#filtercyclegate.;
99 };
100
101 #endif // not __SIDFP_H__