Debian Codegraph @

src/resid/sid.h

raw symbols SCIP
1 // ---------------------------------------------------------------------------cxx . . $ `<file>/src/resid/sid.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 __SID_H__
21 #define __SID_H__cxx . . $ `src/resid/sid.h:21:9`!
22
23 #include "siddefs.h"cxx . . $ `<file>/src/resid/siddefs.h`/
24 #include "voice.h"cxx . . $ `<file>/src/resid/voice.h`/
25 #include "filter.h"cxx . . $ `<file>/src/resid/filter.h`/
26 #include "extfilt.h"cxx . . $ `<file>/src/resid/extfilt.h`/
27 #include "pot.h"cxx . . $ `<file>/src/resid/pot.h`/
28
29 class SIDcxx . . $ SID#
30 {
31 public:
32 SIDcxx . . $ SID#SID(49f6e7a06ebc5aa8).();
33 ~cxx . . $ SID#`~SID`(ced63f7c635d850d).SIDcxx . . $ SID#();
34
35 void set_chip_modelcxx . . $ SID#set_chip_model(cea143c94d31b99f).(chip_modelcxx . . $ chip_model# model);
36 void enable_filtercxx . . $ SID#enable_filter(b45ddcbc8423892c).(bool enable);
37 void enable_external_filtercxx . . $ SID#enable_external_filter(b45ddcbc8423892c).(bool enable);
38 bool set_sampling_parameterscxx . . $ SID#set_sampling_parameters(80f037a0a5be2f87).(double clock_freq, sampling_methodcxx . . $ sampling_method# method,
39 double sample_freq, double pass_freq = -1,
40 double filter_scale = 0.97);
41 void adjust_sampling_frequencycxx . . $ SID#adjust_sampling_frequency(ba8836b59fb42830).(double sample_freq);
42
43 void fc_defaultcxx . . $ SID#fc_default(c5cb538b22a2051f).(const fc_pointcxx . . $ fc_point#*& points, int& count);
44 PointPlottercxx . . $ PointPlotter#<sound_samplecxx . . $ sound_sample#> fc_plottercxx . . $ SID#fc_plotter(d92c3fe0c353d99b).();
45
46 void clockcxx . . $ SID#clock(49f6e7a06ebc5aa8).();
47 void clockcxx . . $ SID#clock(d4f767463ce0a6b3).(cycle_countcxx . . $ cycle_count# delta_t);
48 int clockcxx . . $ SID#clock(1a782d52ea0fd1a5).(cycle_countcxx . . $ cycle_count#& delta_t, short* buf, int n, int interleave = 1);
49 void resetcxx . . $ SID#reset(49f6e7a06ebc5aa8).();
50
51 // Read/write registers.
52 reg8cxx . . $ reg8# readcxx . . $ SID#read(2141b656ce2cc063).(reg8cxx . . $ reg8# offset);
53 void writecxx . . $ SID#write(b4d55b1286ff73e8).(reg8cxx . . $ reg8# offset, reg8cxx . . $ reg8# value);
54
55 // Read/write state.
56 class Statecxx . . $ SID#State#
57 {
58 public:
59 Statecxx . . $ SID#State#State(49f6e7a06ebc5aa8).();
60
61 char sid_registercxx . . $ SID#State#sid_register.[0x20];
62
63 reg8cxx . . $ reg8# bus_valuecxx . . $ SID#State#bus_value.;
64 cycle_countcxx . . $ cycle_count# bus_value_ttlcxx . . $ SID#State#bus_value_ttl.;
65
66 reg24cxx . . $ reg24# accumulatorcxx . . $ SID#State#accumulator.[3];
67 reg24cxx . . $ reg24# shift_registercxx . . $ SID#State#shift_register.[3];
68 reg16cxx . . $ reg16# rate_countercxx . . $ SID#State#rate_counter.[3];
69 reg16cxx . . $ reg16# rate_counter_periodcxx . . $ SID#State#rate_counter_period.[3];
70 reg16cxx . . $ reg16# exponential_countercxx . . $ SID#State#exponential_counter.[3];
71 reg16cxx . . $ reg16# exponential_counter_periodcxx . . $ SID#State#exponential_counter_period.[3];
72 reg8cxx . . $ reg8# envelope_countercxx . . $ SID#State#envelope_counter.[3];
73 EnvelopeGeneratorcxx . . $ EnvelopeGenerator#::Statecxx . . $ EnvelopeGenerator#State# envelope_statecxx . . $ SID#State#envelope_state.[3];
74 bool hold_zerocxx . . $ SID#State#hold_zero.[3];
75 };
76
77 Statecxx . . $ SID#State# read_statecxx . . $ SID#read_state(a192a622f97582ed).();
78 void write_statecxx . . $ SID#write_state(9b699f53737cb54e).(const Statecxx . . $ SID#State#& state);
79
80 // 16-bit input (EXT IN).
81 void inputcxx . . $ SID#input(d4f767463ce0a6b3).(int sample);
82
83 // 16-bit output (AUDIO OUT).
84 int outputcxx . . $ SID#output(b126dc7c1de90089).();
85 // n-bit output.
86 int outputcxx . . $ SID#output(7864480464b09eea).(int bits);
87
88 protected:
89 static double I0cxx . . $ SID#I0(447c67c6676f75c3).(double x);
90 RESID_INLINEcxx . . $ `src/resid/siddefs.h:70:9`! int clock_fastcxx . . $ SID#clock_fast(1a782d52ea0fd1a5).(cycle_countcxx . . $ cycle_count#& delta_t, short* buf, int n,
91 int interleave);
92 RESID_INLINEcxx . . $ `src/resid/siddefs.h:70:9`! int clock_interpolatecxx . . $ SID#clock_interpolate(1a782d52ea0fd1a5).(cycle_countcxx . . $ cycle_count#& delta_t, short* buf, int n,
93 int interleave);
94 RESID_INLINEcxx . . $ `src/resid/siddefs.h:70:9`! int clock_resample_interpolatecxx . . $ SID#clock_resample_interpolate(1a782d52ea0fd1a5).(cycle_countcxx . . $ cycle_count#& delta_t, short* buf,
95 int n, int interleave);
96 RESID_INLINEcxx . . $ `src/resid/siddefs.h:70:9`! int clock_resample_fastcxx . . $ SID#clock_resample_fast(1a782d52ea0fd1a5).(cycle_countcxx . . $ cycle_count#& delta_t, short* buf,
97 int n, int interleave);
98
99 Voicecxx . . $ Voice# voicecxx . . $ SID#voice.[3];
100 Filtercxx . . $ Filter# filtercxx . . $ SID#filter.;
101 ExternalFiltercxx . . $ ExternalFilter# extfiltcxx . . $ SID#extfilt.;
102 Potentiometercxx . . $ Potentiometer# potxcxx . . $ SID#potx.;
103 Potentiometercxx . . $ Potentiometer# potycxx . . $ SID#poty.;
104
105 reg8cxx . . $ reg8# bus_valuecxx . . $ SID#bus_value.;
106 cycle_countcxx . . $ cycle_count# bus_value_ttlcxx . . $ SID#bus_value_ttl.;
107
108 double clock_frequencycxx . . $ SID#clock_frequency.;
109
110 // External audio input.
111 int ext_incxx . . $ SID#ext_in.;
112
113 // Sampling variables.
114 sampling_methodcxx . . $ sampling_method# samplingcxx . . $ SID#sampling.;
115 cycle_countcxx . . $ cycle_count# cycles_per_samplecxx . . $ SID#cycles_per_sample.;
116 cycle_countcxx . . $ cycle_count# sample_offsetcxx . . $ SID#sample_offset.;
117 int sample_indexcxx . . $ SID#sample_index.;
118 short sample_prevcxx . . $ SID#sample_prev.;
119 int fir_Ncxx . . $ SID#fir_N.;
120 int fir_REScxx . . $ SID#fir_RES.;
121
122 // Ring buffer with overflow for contiguous storage of RINGSIZE samples.
123 short* samplecxx . . $ SID#sample.;
124
125 // FIR_RES filter tables (FIR_N*FIR_RES).
126 short* fircxx . . $ SID#fir.;
127 };
128
129 #endif // not __SID_H__