fix TL macro compat for ADSR/LFO

This commit is contained in:
tildearrow 2023-08-25 03:38:17 -05:00
parent 06840de4c7
commit c3b5004e66
1 changed files with 8 additions and 2 deletions

View File

@ -3329,8 +3329,14 @@ DivDataErrors DivInstrument::readInsDataOld(SafeReader &reader, short version) {
// <167 TL macro compat
if (version<167) {
for (int i=0; i<4; i++) {
for (int j=0; j<std.opMacros[i].tlMacro.len; j++) {
std.opMacros[i].tlMacro.val[j]^=0x7f;
if (std.opMacros[i].tlMacro.open&6) {
for (int j=0; j<2; j++) {
std.opMacros[i].tlMacro.val[j]^=0x7f;
}
} else {
for (int j=0; j<std.opMacros[i].tlMacro.len; j++) {
std.opMacros[i].tlMacro.val[j]^=0x7f;
}
}
}
}