Revert and Re-add instrument parameter into multipcm instruemnt

Fix per-channel OSC
This commit is contained in:
cam900 2024-07-13 07:34:53 +09:00
parent 339cc6a5f0
commit b1937b9834
10 changed files with 54 additions and 102 deletions

View file

@ -94,7 +94,6 @@ enum DivInstrumentType: unsigned short {
DIV_INS_GBA_MINMOD=61,
DIV_INS_BIFURCATOR=62,
DIV_INS_SID2=63, // coincidence!
DIV_INS_OPL4PCM=64,
DIV_INS_MAX,
DIV_INS_NULL
};
@ -609,6 +608,7 @@ struct DivInstrumentFDS {
struct DivInstrumentMultiPCM {
unsigned char ar, d1r, dl, d2r, rr, rc;
unsigned char lfo, vib, am;
bool damp, pseudoReverb, lfoReset, levelDirect;
bool operator==(const DivInstrumentMultiPCM& other);
bool operator!=(const DivInstrumentMultiPCM& other) {
@ -617,19 +617,7 @@ struct DivInstrumentMultiPCM {
DivInstrumentMultiPCM():
ar(15), d1r(15), dl(0), d2r(0), rr(15), rc(15),
lfo(0), vib(0), am(0) {
}
};
struct DivInstrumentOPL4PCM {
bool damp, pseudoReverb, lfoReset, levelDirect;
bool operator==(const DivInstrumentOPL4PCM& other);
bool operator!=(const DivInstrumentOPL4PCM& other) {
return !(*this==other);
}
DivInstrumentOPL4PCM():
lfo(0), vib(0), am(0),
damp(false),
pseudoReverb(false),
lfoReset(false),
@ -896,7 +884,6 @@ struct DivInstrument {
DivInstrumentESFM esfm;
DivInstrumentPowerNoise powernoise;
DivInstrumentSID2 sid2;
DivInstrumentOPL4PCM opl4pcm;
/**
* these are internal functions.
@ -924,7 +911,6 @@ struct DivInstrument {
void writeFeatureEF(SafeWriter* w);
void writeFeaturePN(SafeWriter* w);
void writeFeatureS2(SafeWriter* w);
void writeFeatureO4(SafeWriter* w);
void readFeatureNA(SafeReader& reader, short version);
void readFeatureFM(SafeReader& reader, short version);
@ -948,7 +934,6 @@ struct DivInstrument {
void readFeatureEF(SafeReader& reader, short version);
void readFeaturePN(SafeReader& reader, short version);
void readFeatureS2(SafeReader& reader, short version);
void readFeatureO4(SafeReader& reader, short version);
DivDataErrors readInsDataOld(SafeReader& reader, short version);
DivDataErrors readInsDataNew(SafeReader& reader, short version, bool fui, DivSong* song);