Debian Codegraph @

src/resid-fp/voicefp.h

raw symbols SCIP
1 // ---------------------------------------------------------------------------cxx . . $ `<file>/src/resid-fp/voicefp.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 __VOICEFP_H__
21 #define __VOICEFP_H__cxx . . $ `src/resid-fp/voicefp.h:21:9`!
22
23 #include "siddefsfp.h"cxx . . $ `<file>/src/resid-fp/siddefsfp.h`/
24 #include "wavefp.h"cxx . . $ `<file>/src/resid-fp/wavefp.h`/
25 #include "envelopefp.h"cxx . . $ `<file>/src/resid-fp/envelopefp.h`/
26
27 class VoiceFPcxx . . $ VoiceFP#
28 {
29 public:
30 VoiceFPcxx . . $ VoiceFP#VoiceFP(49f6e7a06ebc5aa8).();
31
32 void set_chip_modelcxx . . $ VoiceFP#set_chip_model(cea143c94d31b99f).(chip_modelcxx . . $ chip_model# model);
33 void resetcxx . . $ VoiceFP#reset(49f6e7a06ebc5aa8).();
34 void mutecxx . . $ VoiceFP#mute(b45ddcbc8423892c).(bool enable);
35
36 void writeCONTROL_REGcxx . . $ VoiceFP#writeCONTROL_REG(9dc1848052cb5733).(WaveformGeneratorFPcxx . . $ WaveformGeneratorFP#& source, reg8cxx . . $ reg8# value);
37
38 // Amplitude modulated waveform output.
39 // Range [-2048*255, 2047*255].
40 inline float outputcxx . . $ VoiceFP#output(d83fafc7bbddfa49).(WaveformGeneratorFPcxx . . $ WaveformGeneratorFP#& source);
41
42 protected:
43 WaveformGeneratorFPcxx . . $ WaveformGeneratorFP# wavecxx . . $ VoiceFP#wave.;
44 EnvelopeGeneratorFPcxx . . $ EnvelopeGeneratorFP# envelopecxx . . $ VoiceFP#envelope.;
45
46 // Multiplying D/A DC offset.
47 float voice_DCcxx . . $ VoiceFP#voice_DC.;
48 friend class SIDFPcxx . . $ SIDFP#;
49 };
50
51 // ----------------------------------------------------------------------------
52 // Amplitude modulated waveform output.
53 // Ideal range [-2048*255, 2047*255].
54 // ----------------------------------------------------------------------------
55
56 inline
57 float VoiceFPcxx . . $ VoiceFP#::outputcxx . . $ VoiceFP#output(d83fafc7bbddfa49).(WaveformGeneratorFPcxx . . $ WaveformGeneratorFP#& source)
58 {
59 return wavecxx . . $ VoiceFP#wave..outputcxx . . $ WaveformGeneratorFP#output(d83fafc7bbddfa49).(source) * envelopecxx . . $ VoiceFP#envelope..outputcxx . . $ EnvelopeGeneratorFP#output(9b8c9e39889c762c).() + voice_DCcxx . . $ VoiceFP#voice_DC.;
60 }
61
62 #endif // not __VOICEFP_H__