From badf91d44748fe52bba6fc521f4d989644cd44d2 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sun, 20 Nov 2022 04:01:14 -0500 Subject: [PATCH] new ins format, part 6 --- src/engine/instrument.cpp | 197 +++++++++++++++++++++++++++++++++++++- src/engine/instrument.h | 23 ++++- 2 files changed, 213 insertions(+), 7 deletions(-) diff --git a/src/engine/instrument.cpp b/src/engine/instrument.cpp index e509612d1..622c9b60f 100644 --- a/src/engine/instrument.cpp +++ b/src/engine/instrument.cpp @@ -1720,9 +1720,196 @@ void DivInstrument::putInsData(SafeWriter* w) { w->seek(0,SEEK_END); } -DivDataErrors DivInstrument::readInsDataNew(SafeReader& reader, short version, bool fui) { - logE("new ins reading not implemented yet!"); - return DIV_DATA_INVALID_DATA; +#define READ_FEAT_BEGIN \ + unsigned short featLen=reader.readS(); \ + size_t endOfFeat=reader.tell()+featLen; + +#define READ_FEAT_END \ + if (reader.tell()