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" 47 bool isPlaying()
const;
50 int readBuffer(int16 *buffer,
const int numSamples)
override;
51 bool endOfData()
const override {
return !_musicActive; }
55 static const byte kChannelCount = 3;
56 static const byte kMaxNote = 94;
67 const byte *orderList;
70 uint16 patternDataOffset;
73 byte instrumentOffset;
86 byte arpeggioSequencePos;
87 byte arpeggioSequence[9];
88 byte arpeggioSequenceLen;
100 byte instrumentFlags;
101 bool gateOffDisabled;
119 int _tickSampleCount;
120 ChannelState _channels[kChannelCount];
121 byte _arpeggioIntervals[8];
126 void loadNextPattern(
int channel);
127 void buildEffectArpeggio(
int channel);
128 void loadCurrentPeriod(
int channel);
129 void finalizeChannel(
int channel);
130 void processChannel(
int channel,
bool newBeat);
131 void parseCommands(
int channel);
132 void applyNote(
int channel, byte note);
133 void applyFrameEffects(
int channel);
134 bool applyInstrumentVibrato(
int channel);
135 void applyEffectArpeggio(
int channel);
136 void applyTimedSlide(
int channel);
138 void triggerADSR(
int channel, byte ad, byte sr);
139 void releaseADSR(
int channel);
140 void updateADSR(
int channel);
142 byte readPatternByte(
int channel);
143 byte clampNote(byte note)
const;
144 void writeChannelPeriod(
int channel, uint16 period);
int readBuffer(int16 *buffer, const int numSamples) override
bool endOfStream() const override
Definition: ay.music.h:52
Definition: ay.music.h:40
bool endOfData() const override
Definition: ay.music.h:51