MultiPCM instrument type, editor and file ops.
This commit is contained in:
parent
9a2938ff3e
commit
3784c4e1d2
5 changed files with 164 additions and 4 deletions
|
|
@ -45,8 +45,8 @@
|
|||
#define BUSY_BEGIN_SOFT softLocked=true; isBusy.lock();
|
||||
#define BUSY_END isBusy.unlock(); softLocked=false;
|
||||
|
||||
#define DIV_VERSION "dev92"
|
||||
#define DIV_ENGINE_VERSION 92
|
||||
#define DIV_VERSION "dev93"
|
||||
#define DIV_ENGINE_VERSION 93
|
||||
|
||||
// for imports
|
||||
#define DIV_VERSION_MOD 0xff01
|
||||
|
|
|
|||
|
|
@ -506,6 +506,20 @@ void DivInstrument::putInsData(SafeWriter* w) {
|
|||
|
||||
// C64 no test
|
||||
w->writeC(c64.noTest);
|
||||
|
||||
// MultiPCM
|
||||
w->writeC(multipcm.ar);
|
||||
w->writeC(multipcm.d1r);
|
||||
w->writeC(multipcm.dl);
|
||||
w->writeC(multipcm.d2r);
|
||||
w->writeC(multipcm.rr);
|
||||
w->writeC(multipcm.rc);
|
||||
w->writeC(multipcm.lfo);
|
||||
w->writeC(multipcm.vib);
|
||||
w->writeC(multipcm.am);
|
||||
for (int j=0; j<23; j++) { // reserved
|
||||
w->writeC(0);
|
||||
}
|
||||
}
|
||||
|
||||
DivDataErrors DivInstrument::readInsData(SafeReader& reader, short version) {
|
||||
|
|
@ -1014,6 +1028,21 @@ DivDataErrors DivInstrument::readInsData(SafeReader& reader, short version) {
|
|||
c64.noTest=reader.readC();
|
||||
}
|
||||
|
||||
// MultiPCM
|
||||
if (version>=93) {
|
||||
multipcm.ar=reader.readC();
|
||||
multipcm.d1r=reader.readC();
|
||||
multipcm.dl=reader.readC();
|
||||
multipcm.d2r=reader.readC();
|
||||
multipcm.rr=reader.readC();
|
||||
multipcm.rc=reader.readC();
|
||||
multipcm.lfo=reader.readC();
|
||||
multipcm.vib=reader.readC();
|
||||
multipcm.am=reader.readC();
|
||||
// reserved
|
||||
for (int k=0; k<23; k++) reader.readC();
|
||||
}
|
||||
|
||||
return DIV_DATA_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -338,6 +338,16 @@ struct DivInstrumentFDS {
|
|||
}
|
||||
};
|
||||
|
||||
struct DivInstrumentMultiPCM {
|
||||
unsigned char ar, d1r, dl, d2r, rr, rc;
|
||||
unsigned char lfo, vib, am;
|
||||
|
||||
DivInstrumentMultiPCM():
|
||||
ar(15), d1r(15), dl(0), d2r(0), rr(15), rc(15),
|
||||
lfo(0), vib(0), am(0) {
|
||||
}
|
||||
};
|
||||
|
||||
enum DivWaveSynthEffects {
|
||||
DIV_WS_NONE=0,
|
||||
// one waveform effects
|
||||
|
|
@ -393,6 +403,7 @@ struct DivInstrument {
|
|||
DivInstrumentAmiga amiga;
|
||||
DivInstrumentN163 n163;
|
||||
DivInstrumentFDS fds;
|
||||
DivInstrumentMultiPCM multipcm;
|
||||
DivInstrumentWaveSynth ws;
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue