mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 13:05:11 +00:00
Merge branch 'cam900-ins_fix'
This commit is contained in:
commit
261bc58347
1 changed files with 50 additions and 24 deletions
|
@ -236,40 +236,40 @@ void DivInstrument::putInsData(SafeWriter* w) {
|
|||
for (int i=0; i<4; i++) {
|
||||
DivInstrumentSTD::OpMacro& op=std.opMacros[i];
|
||||
for (int j=0; j<op.amMacro.len; j++) {
|
||||
w->writeC(op.amMacro.val[j]);
|
||||
w->writeC(op.amMacro.val[j]&0xff);
|
||||
}
|
||||
for (int j=0; j<op.arMacro.len; j++) {
|
||||
w->writeC(op.arMacro.val[j]);
|
||||
w->writeC(op.arMacro.val[j]&0xff);
|
||||
}
|
||||
for (int j=0; j<op.drMacro.len; j++) {
|
||||
w->writeC(op.drMacro.val[j]);
|
||||
w->writeC(op.drMacro.val[j]&0xff);
|
||||
}
|
||||
for (int j=0; j<op.multMacro.len; j++) {
|
||||
w->writeC(op.multMacro.val[j]);
|
||||
w->writeC(op.multMacro.val[j]&0xff);
|
||||
}
|
||||
for (int j=0; j<op.rrMacro.len; j++) {
|
||||
w->writeC(op.rrMacro.val[j]);
|
||||
w->writeC(op.rrMacro.val[j]&0xff);
|
||||
}
|
||||
for (int j=0; j<op.slMacro.len; j++) {
|
||||
w->writeC(op.slMacro.val[j]);
|
||||
w->writeC(op.slMacro.val[j]&0xff);
|
||||
}
|
||||
for (int j=0; j<op.tlMacro.len; j++) {
|
||||
w->writeC(op.tlMacro.val[j]);
|
||||
w->writeC(op.tlMacro.val[j]&0xff);
|
||||
}
|
||||
for (int j=0; j<op.dt2Macro.len; j++) {
|
||||
w->writeC(op.dt2Macro.val[j]);
|
||||
w->writeC(op.dt2Macro.val[j]&0xff);
|
||||
}
|
||||
for (int j=0; j<op.rsMacro.len; j++) {
|
||||
w->writeC(op.rsMacro.val[j]);
|
||||
w->writeC(op.rsMacro.val[j]&0xff);
|
||||
}
|
||||
for (int j=0; j<op.dtMacro.len; j++) {
|
||||
w->writeC(op.dtMacro.val[j]);
|
||||
w->writeC(op.dtMacro.val[j]&0xff);
|
||||
}
|
||||
for (int j=0; j<op.d2rMacro.len; j++) {
|
||||
w->writeC(op.d2rMacro.val[j]);
|
||||
w->writeC(op.d2rMacro.val[j]&0xff);
|
||||
}
|
||||
for (int j=0; j<op.ssgMacro.len; j++) {
|
||||
w->writeC(op.ssgMacro.val[j]);
|
||||
w->writeC(op.ssgMacro.val[j]&0xff);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -696,20 +696,45 @@ DivDataErrors DivInstrument::readInsData(SafeReader& reader, short version) {
|
|||
op.ssgMacro.open=reader.readC();
|
||||
}
|
||||
|
||||
// FM macro low 8 bits
|
||||
for (int i=0; i<4; i++) {
|
||||
DivInstrumentSTD::OpMacro& op=std.opMacros[i];
|
||||
reader.read(op.amMacro.val,op.amMacro.len);
|
||||
reader.read(op.arMacro.val,op.arMacro.len);
|
||||
reader.read(op.drMacro.val,op.drMacro.len);
|
||||
reader.read(op.multMacro.val,op.multMacro.len);
|
||||
reader.read(op.rrMacro.val,op.rrMacro.len);
|
||||
reader.read(op.slMacro.val,op.slMacro.len);
|
||||
reader.read(op.tlMacro.val,op.tlMacro.len);
|
||||
reader.read(op.dt2Macro.val,op.dt2Macro.len);
|
||||
reader.read(op.rsMacro.val,op.rsMacro.len);
|
||||
reader.read(op.dtMacro.val,op.dtMacro.len);
|
||||
reader.read(op.d2rMacro.val,op.d2rMacro.len);
|
||||
reader.read(op.ssgMacro.val,op.ssgMacro.len);
|
||||
for (int j=0; j<op.amMacro.len; j++) {
|
||||
op.amMacro.val[j]=(unsigned char)reader.readC();
|
||||
}
|
||||
for (int j=0; j<op.arMacro.len; j++) {
|
||||
op.arMacro.val[j]=(unsigned char)reader.readC();
|
||||
}
|
||||
for (int j=0; j<op.drMacro.len; j++) {
|
||||
op.drMacro.val[j]=(unsigned char)reader.readC();
|
||||
}
|
||||
for (int j=0; j<op.multMacro.len; j++) {
|
||||
op.multMacro.val[j]=(unsigned char)reader.readC();
|
||||
}
|
||||
for (int j=0; j<op.rrMacro.len; j++) {
|
||||
op.rrMacro.val[j]=(unsigned char)reader.readC();
|
||||
}
|
||||
for (int j=0; j<op.slMacro.len; j++) {
|
||||
op.slMacro.val[j]=(unsigned char)reader.readC();
|
||||
}
|
||||
for (int j=0; j<op.tlMacro.len; j++) {
|
||||
op.tlMacro.val[j]=(unsigned char)reader.readC();
|
||||
}
|
||||
for (int j=0; j<op.dt2Macro.len; j++) {
|
||||
op.dt2Macro.val[j]=(unsigned char)reader.readC();
|
||||
}
|
||||
for (int j=0; j<op.rsMacro.len; j++) {
|
||||
op.rsMacro.val[j]=(unsigned char)reader.readC();
|
||||
}
|
||||
for (int j=0; j<op.dtMacro.len; j++) {
|
||||
op.dtMacro.val[j]=(unsigned char)reader.readC();
|
||||
}
|
||||
for (int j=0; j<op.d2rMacro.len; j++) {
|
||||
op.d2rMacro.val[j]=(unsigned char)reader.readC();
|
||||
}
|
||||
for (int j=0; j<op.ssgMacro.len; j++) {
|
||||
op.ssgMacro.val[j]=(unsigned char)reader.readC();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -921,6 +946,7 @@ DivDataErrors DivInstrument::readInsData(SafeReader& reader, short version) {
|
|||
ws.param3=reader.readC();
|
||||
ws.param4=reader.readC();
|
||||
}
|
||||
|
||||
return DIV_DATA_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue