22 #ifndef FREESCAPE_CASTLE_C64_MUSIC_H 23 #define FREESCAPE_CASTLE_C64_MUSIC_H 25 #include "audio/sid.h" 26 #include "audio/audiostream.h" 27 #include "audio/mixer.h" 28 #include "common/array.h" 29 #include "freescape/music.h" 35 void enableCastleC64Sound(Sound *sound,
bool enabled);
36 void updateCastleC64GhostSound(Sound *sound,
bool active);
43 void startMusic()
override;
44 void stopMusic()
override;
45 bool isPlaying()
const override;
46 int readBuffer(int16 *buffer,
int numSamples)
override;
48 bool isStereo()
const override {
return false; }
58 const byte *orderList;
61 uint16 patternDataOffset;
68 int16 frequencyOffset;
74 void reset(
const byte *channelOrderList);
81 int _samplesUntilTick;
84 ChannelState _channels[kChannelCount];
88 void sidWrite(
int reg, byte data);
92 void loadNextPattern(
int channel);
93 byte readPatternByte(
int channel);
94 void parseCommands(
int channel);
95 void noteOn(
int channel, byte note);
96 void rest(
int channel);
97 void gateOff(
int channel);
98 void writeFrequency(
int channel, uint16 frequency);
99 uint16 noteToSIDFrequency(
int note)
const;
100 void applyFrameEffects(
int channel);
101 byte sidControlForInstrument(byte instrument)
const;
bool endOfData() const override
Definition: c64.music.h:49
bool isStereo() const override
Definition: c64.music.h:48
Definition: audiostream.h:50
int readBuffer(int16 *buffer, int numSamples) override
int getRate() const override
Definition: c64.music.h:38