22 #ifndef FREESCAPE_ECLIPSE_AY_MUSIC_H 23 #define FREESCAPE_ECLIPSE_AY_MUSIC_H 25 #include "audio/softsynth/ay8912.h" 26 #include "audio/mixer.h" 27 #include "freescape/music.h" 46 void startMusic()
override;
47 void stopMusic()
override;
48 bool isPlaying()
const override;
51 int readBuffer(int16 *buffer,
const int numSamples)
override;
52 bool endOfData()
const override {
return !_musicActive; }
56 static const byte kChannelCount = 3;
57 static const byte kMaxNote = 94;
68 const byte *orderList;
71 uint16 patternDataOffset;
74 byte instrumentOffset;
87 byte arpeggioSequencePos;
88 byte arpeggioSequence[9];
89 byte arpeggioSequenceLen;
101 byte instrumentFlags;
102 bool gateOffDisabled;
120 int _tickSampleCount;
121 ChannelState _channels[kChannelCount];
122 byte _arpeggioIntervals[8];
127 void loadNextPattern(
int channel);
128 void buildEffectArpeggio(
int channel);
129 void loadCurrentPeriod(
int channel);
130 void finalizeChannel(
int channel);
131 void processChannel(
int channel,
bool newBeat);
132 void parseCommands(
int channel);
133 void applyNote(
int channel, byte note);
134 void applyFrameEffects(
int channel);
135 bool applyInstrumentVibrato(
int channel);
136 void applyEffectArpeggio(
int channel);
137 void applyTimedSlide(
int channel);
139 void triggerADSR(
int channel, byte ad, byte sr);
140 void releaseADSR(
int channel);
141 void updateADSR(
int channel);
143 byte readPatternByte(
int channel);
144 byte clampNote(byte note)
const;
145 void writeChannelPeriod(
int channel, uint16 period);
int readBuffer(int16 *buffer, const int numSamples) override
bool endOfStream() const override
Definition: ay.music.h:53
Definition: ay.music.h:41
bool endOfData() const override
Definition: ay.music.h:52