/[svn]/libgig/trunk/src/gig.cpp
ViewVC logotype

Diff of /libgig/trunk/src/gig.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2640 by schoenebeck, Mon Jun 16 14:54:06 2014 UTC revision 2667 by schoenebeck, Mon Jul 7 15:20:22 2014 UTC
# Line 4520  namespace { Line 4520  namespace {
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();
# Line 4547  namespace { Line 4551  namespace {
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    
4561      void Instrument::UpdateScriptFileOffsets() {      void Instrument::UpdateScriptFileOffsets() {
4562         // own gig format extensions         // own gig format extensions
4563         if (pScriptRefs) {         if (pScriptRefs && pScriptRefs->size() > 0) {
4564             RIFF::List* lst3LS = pCkInstrument->GetSubList(LIST_TYPE_3LS);             RIFF::List* lst3LS = pCkInstrument->GetSubList(LIST_TYPE_3LS);
4565             RIFF::Chunk* ckSCSL = lst3LS->GetSubChunk(CHUNK_ID_SCSL);             RIFF::Chunk* ckSCSL = lst3LS->GetSubChunk(CHUNK_ID_SCSL);
4566             const int slotCount = pScriptRefs->size();             const int slotCount = pScriptRefs->size();

Legend:
Removed from v.2640  
changed lines
  Added in v.2667

  ViewVC Help
Powered by ViewVC