Read and Write this

This commit is contained in:
cam900 2022-04-10 18:38:48 +09:00
parent 518841c17e
commit 075ec9b6de

View file

@ -70,6 +70,7 @@ void DivInstrument::putInsData(SafeWriter* w) {
for (int j=0; j<4; j++) {
DivInstrumentFM::Operator& op=fm.op[j];
w->writeC(op.enable?1:0);
w->writeC(op.am);
w->writeC(op.ar);
w->writeC(op.dr);
@ -631,6 +632,9 @@ DivDataErrors DivInstrument::readInsData(SafeReader& reader, short version) {
for (int j=0; j<4; j++) {
DivInstrumentFM::Operator& op=fm.op[j];
if (istest) {
op.enable=reader.readC();
}
op.am=reader.readC();
op.ar=reader.readC();
op.dr=reader.readC();