Debian Codegraph @

src/engine/platform/sound/tia/AudioChannel.h

raw
1 //============================================================================
2 //
3 // SSSS tt lll lll
4 // SS SS tt ll ll
5 // SS tttttt eeee ll ll aaaa
6 // SSSS tt ee ee ll ll aa
7 // SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
8 // SS SS tt ee ll ll aa aa
9 // SSSS ttt eeeee llll llll aaaaa
10 //
11 // Copyright (c) 1995-2021 by Bradford W. Mott, Stephen Anthony
12 // and the Stella Team
13 //
14 // See the file "License.txt" for information on usage and redistribution of
15 // this file, and for a DISCLAIMER OF ALL WARRANTIES.
16 //============================================================================
17
18 #ifndef TIA_AUDIO_CHANNEL_HXX
19 #define TIA_AUDIO_CHANNEL_HXX
20
21 namespace TIA {
22 class AudioChannel
23 {
24 public:
25 AudioChannel() = default;
26
27 void reset();
28
29 void phase0();
30
31 unsigned char phase1();
32
33 void audc(unsigned char value);
34
35 void audf(unsigned char value);
36
37 void audv(unsigned char value);
38
39 private:
40 unsigned char myAudc{0};
41 unsigned char myAudv{0};
42 unsigned char myAudf{0};
43
44 bool myClockEnable{false};
45 bool myNoiseFeedback{false};
46 bool myNoiseCounterBit4{false};
47 bool myPulseCounterHold{false};
48
49 unsigned char myDivCounter{0};
50 unsigned char myPulseCounter{0};
51 unsigned char myNoiseCounter{0};
52
53 private:
54 AudioChannel(const AudioChannel&) = delete;
55 AudioChannel(AudioChannel&&) = delete;
56 AudioChannel& operator=(const AudioChannel&) = delete;
57 AudioChannel& operator=(AudioChannel&&) = delete;
58 };
59 }
60
61 #endif // TIA_AUDIO_CHANNEL_HXX