Reduce duplicates of channel struct

Add/Fix custom clock limit defines (for YMF278B)
This commit is contained in:
cam900 2022-12-04 19:58:58 +09:00
parent fd3f381bc3
commit 2ec4237076
69 changed files with 457 additions and 1151 deletions

View file

@ -26,18 +26,17 @@
class DivPlatformTIA: public DivDispatch {
protected:
struct Channel {
int freq, baseFreq, pitch, pitch2, note, ins;
struct Channel: public SharedChannelFreq, public SharedChannelVolume<int> {
unsigned char shape;
signed char konCycles;
bool active, insChanged, freqChanged, keyOn, keyOff, portaPause, inPorta;
int vol, outVol;
DivMacroInt std;
void macroInit(DivInstrument* which) {
std.init(which);
pitch2=0;
}
Channel(): freq(0), baseFreq(0), pitch(0), pitch2(0), note(0), ins(-1), shape(4), active(false), insChanged(true), freqChanged(false), keyOn(false), keyOff(false), portaPause(false), inPorta(false), vol(0), outVol(15) {}
Channel():
SharedChannelFreq(),
SharedChannelVolume<int>(15),
shape(4) {}
};
Channel chan[2];
DivDispatchOscBuffer* oscBuf[2];