4520 |
} |
} |
4521 |
|
|
4522 |
// own gig format extensions |
// own gig format extensions |
4523 |
if (pScriptRefs) { |
if (ScriptSlotCount()) { |
4524 |
|
// make sure we have converted the original loaded script file |
4525 |
|
// offsets into valid Script object pointers |
4526 |
|
LoadScripts(); |
4527 |
|
|
4528 |
RIFF::List* lst3LS = pCkInstrument->GetSubList(LIST_TYPE_3LS); |
RIFF::List* lst3LS = pCkInstrument->GetSubList(LIST_TYPE_3LS); |
4529 |
if (!lst3LS) lst3LS = pCkInstrument->AddSubList(LIST_TYPE_3LS); |
if (!lst3LS) lst3LS = pCkInstrument->AddSubList(LIST_TYPE_3LS); |
4530 |
const int slotCount = pScriptRefs->size(); |
const int slotCount = pScriptRefs->size(); |
4551 |
store32(&pData[pos], (*pScriptRefs)[i].bypass ? 1 : 0); |
store32(&pData[pos], (*pScriptRefs)[i].bypass ? 1 : 0); |
4552 |
pos += sizeof(uint32_t); |
pos += sizeof(uint32_t); |
4553 |
} |
} |
4554 |
|
} else { |
4555 |
|
// no script slots, so get rid of any LS custom RIFF chunks (if any) |
4556 |
|
RIFF::List* lst3LS = pCkInstrument->GetSubList(LIST_TYPE_3LS); |
4557 |
|
if (lst3LS) pCkInstrument->DeleteSubChunk(lst3LS); |
4558 |
} |
} |
4559 |
} |
} |
4560 |
|
|