22 #ifndef FREESCAPE_CASTLE_AY_MUSIC_H 23 #define FREESCAPE_CASTLE_AY_MUSIC_H 25 #include "audio/mixer.h" 26 #include "audio/softsynth/ay8912.h" 27 #include "freescape/music.h" 42 void startMusic()
override;
43 void stopMusic()
override;
44 bool isPlaying()
const override;
46 int readBuffer(int16 *buffer,
const int numSamples)
override;
47 bool endOfData()
const override {
return !_musicActive; }
65 const byte *orderList;
68 uint16 patternDataOffset;
74 uint16 baseSIDFrequency;
82 int16 sidFrequencyOffset;
90 void reset(
const byte *channelOrderList);
99 ChannelState _channels[kChannelCount];
104 void loadNextPattern(
int channel);
105 byte readPatternByte(
int channel);
106 void parseCommands(
int channel);
107 void noteOn(
int channel, byte note);
108 void noteOff(
int channel);
109 void writeChannelPeriod(
int channel, uint16 period);
110 void noteToPeriod(
int note, uint16 &period)
const;
111 void applyFrameEffects(
int channel);
112 void triggerADSR(
int channel, byte attackDecay, byte sustainRelease);
113 void releaseADSR(
int channel);
114 void updateADSR(
int channel);
115 void setChannelOutput(
int channel,
bool toneEnabled,
bool noiseEnabled);
116 void writeNoisePeriod(uint16 period);
117 byte sidControlForInstrument(byte instrument)
const;
118 byte instrumentVolumeScale(byte instrument)
const;
bool endOfStream() const override
Definition: ay.music.h:48
int readBuffer(int16 *buffer, const int numSamples) override
Definition: ay.music.h:37
bool endOfData() const override
Definition: ay.music.h:47