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

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

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

revision 800 by schoenebeck, Wed Nov 9 20:04:11 2005 UTC revision 823 by schoenebeck, Fri Dec 23 01:38:50 2005 UTC
# Line 212  namespace DLS { Line 212  namespace DLS {
212       * call File::Save() to make changes persistent.       * call File::Save() to make changes persistent.
213       */       */
214      void Articulator::UpdateChunks() {      void Articulator::UpdateChunks() {
215          ArticulationList::iterator iter = pArticulations->begin();          if (pArticulations) {
216          ArticulationList::iterator end  = pArticulations->end();              ArticulationList::iterator iter = pArticulations->begin();
217          for (; iter != end; ++iter) {              ArticulationList::iterator end  = pArticulations->end();
218              (*iter)->UpdateChunks();              for (; iter != end; ++iter) {
219                    (*iter)->UpdateChunks();
220                }
221          }          }
222      }      }
223    
# Line 255  namespace DLS { Line 257  namespace DLS {
257          }          }
258      }      }
259    
260        Info::~Info() {
261        }
262    
263      /** @brief Load given INFO field.      /** @brief Load given INFO field.
264       *       *
265       * Load INFO field from INFO chunk with chunk ID \a ChunkID from INFO       * Load INFO field from INFO chunk with chunk ID \a ChunkID from INFO
# Line 273  namespace DLS { Line 278  namespace DLS {
278       *       *
279       * Apply given info value to info chunk with ID \a ChunkID, which is a       * Apply given info value to info chunk with ID \a ChunkID, which is a
280       * subchunk of INFO list chunk \a lstINFO. If the given chunk already       * subchunk of INFO list chunk \a lstINFO. If the given chunk already
281       * exists, value \a s will be applied, otherwise if it doesn't exist yet       * exists, value \a s will be applied. Otherwise if it doesn't exist yet
282       * and \a sDefault is not an empty string, such a chunk will be created       * and either \a s or \a sDefault is not an empty string, such a chunk
283       * and \a sDefault will be applied.       * will be created and either \a s or \a sDefault will be applied
284         * (depending on which one is not an empty string, if both are not an
285         * empty string \a s will be preferred).
286       *       *
287       * @param ChunkID  - 32 bit RIFF chunk ID of INFO subchunk       * @param ChunkID  - 32 bit RIFF chunk ID of INFO subchunk
288       * @param lstINFO  - parent (INFO) RIFF list chunk       * @param lstINFO  - parent (INFO) RIFF list chunk
# Line 288  namespace DLS { Line 295  namespace DLS {
295              ck->Resize(s.size() + 1);              ck->Resize(s.size() + 1);
296              char* pData = (char*) ck->LoadChunkData();              char* pData = (char*) ck->LoadChunkData();
297              memcpy(pData, s.c_str(), s.size() + 1);              memcpy(pData, s.c_str(), s.size() + 1);
298          } else if (sDefault != "") { // create chunk and use default value          } else if (s != "" || sDefault != "") { // create chunk
299              ck = lstINFO->AddSubChunk(ChunkID, sDefault.size() + 1);              const String& sToSave = (s != "") ? s : sDefault;
300                ck = lstINFO->AddSubChunk(ChunkID, sToSave.size() + 1);
301              char* pData = (char*) ck->LoadChunkData();              char* pData = (char*) ck->LoadChunkData();
302              memcpy(pData, sDefault.c_str(), sDefault.size() + 1);              memcpy(pData, sToSave.c_str(), sToSave.size() + 1);
303          }          }
304      }      }
305    
# Line 312  namespace DLS { Line 320  namespace DLS {
320          // get current date          // get current date
321          time_t now = time(NULL);          time_t now = time(NULL);
322          tm* pNowBroken = localtime(&now);          tm* pNowBroken = localtime(&now);
323          String defaultCreationDate = ToString(pNowBroken->tm_year) + "-" +          String defaultCreationDate = ToString(1900 + pNowBroken->tm_year) + "-" +
324                                       ToString(pNowBroken->tm_mon)  + "-" +                                       ToString(pNowBroken->tm_mon + 1)  + "-" +
325                                       ToString(pNowBroken->tm_mday);                                       ToString(pNowBroken->tm_mday);
326          String defaultSoftware = libraryName() + " " + libraryVersion();          String defaultSoftware = libraryName() + " " + libraryVersion();
327          String defaultComments = "Created with " + libraryName() + " " + libraryVersion();          String defaultComments = "Created with " + libraryName() + " " + libraryVersion();
# Line 816  namespace DLS { Line 824  namespace DLS {
824          // get sample's wave pool table index          // get sample's wave pool table index
825          int index = -1;          int index = -1;
826          File* pFile = (File*) GetParent()->GetParent();          File* pFile = (File*) GetParent()->GetParent();
827          File::SampleList::iterator iter = pFile->pSamples->begin();          if (pFile->pSamples) {
828          File::SampleList::iterator end  = pFile->pSamples->end();              File::SampleList::iterator iter = pFile->pSamples->begin();
829          for (int i = 0; iter != end; ++iter, i++) {              File::SampleList::iterator end  = pFile->pSamples->end();
830              if (*iter == pSample) {              for (int i = 0; iter != end; ++iter, i++) {
831                  index = i;                  if (*iter == pSample) {
832                  break;                      index = i;
833                        break;
834                    }
835              }              }
836          }          }
837          if (index < 0) throw Exception("Could not save Region, could not find Region's sample");          if (index < 0) throw Exception("Could not save Region, could not find Region's sample");
# Line 888  namespace DLS { Line 898  namespace DLS {
898      }      }
899    
900      void Instrument::LoadRegions() {      void Instrument::LoadRegions() {
901            if (!pRegions) pRegions = new RegionList;
902          RIFF::List* lrgn = pCkInstrument->GetSubList(LIST_TYPE_LRGN);          RIFF::List* lrgn = pCkInstrument->GetSubList(LIST_TYPE_LRGN);
903          if (!lrgn) throw DLS::Exception("Mandatory chunks in <ins > chunk not found.");          if (lrgn) {
904          uint32_t regionCkType = (lrgn->GetSubList(LIST_TYPE_RGN2)) ? LIST_TYPE_RGN2 : LIST_TYPE_RGN; // prefer regions level 2              uint32_t regionCkType = (lrgn->GetSubList(LIST_TYPE_RGN2)) ? LIST_TYPE_RGN2 : LIST_TYPE_RGN; // prefer regions level 2
905          RIFF::List* rgn = lrgn->GetFirstSubList();              RIFF::List* rgn = lrgn->GetFirstSubList();
906          while (rgn) {              while (rgn) {
907              if (rgn->GetListType() == regionCkType) {                  if (rgn->GetListType() == regionCkType) {
908                  if (!pRegions) pRegions = new RegionList;                      pRegions->push_back(new Region(this, rgn));
909                  pRegions->push_back(new Region(this, rgn));                  }
910                    rgn = lrgn->GetNextSubList();
911              }              }
             rgn = lrgn->GetNextSubList();  
912          }          }
913      }      }
914    
915      Region* Instrument::AddRegion() {      Region* Instrument::AddRegion() {
916          if (!pRegions) pRegions = new RegionList;          if (!pRegions) LoadRegions();
917          RIFF::List* lrgn = pCkInstrument->GetSubList(LIST_TYPE_LRGN);          RIFF::List* lrgn = pCkInstrument->GetSubList(LIST_TYPE_LRGN);
918          if (!lrgn)  lrgn = pCkInstrument->AddSubList(LIST_TYPE_LRGN);          if (!lrgn)  lrgn = pCkInstrument->AddSubList(LIST_TYPE_LRGN);
919          RIFF::List* rgn = lrgn->AddSubList(LIST_TYPE_RGN);          RIFF::List* rgn = lrgn->AddSubList(LIST_TYPE_RGN);
920          Region* pNewRegion = new Region(this, rgn);          Region* pNewRegion = new Region(this, rgn);
921          pRegions->push_back(pNewRegion);          pRegions->push_back(pNewRegion);
922            Regions = pRegions->size();
923          return pNewRegion;          return pNewRegion;
924      }      }
925    
926      void Instrument::DeleteRegion(Region* pRegion) {      void Instrument::DeleteRegion(Region* pRegion) {
927            if (!pRegions) return;
928          RegionList::iterator iter = find(pRegions->begin(), pRegions->end(), pRegion);          RegionList::iterator iter = find(pRegions->begin(), pRegions->end(), pRegion);
929          if (iter == pRegions->end()) return;          if (iter == pRegions->end()) return;
930          pRegions->erase(iter);          pRegions->erase(iter);
931            Regions = pRegions->size();
932          delete pRegion;          delete pRegion;
933      }      }
934    
# Line 933  namespace DLS { Line 947  namespace DLS {
947          if (!insh) insh = pCkInstrument->AddSubChunk(CHUNK_ID_INSH, 12);          if (!insh) insh = pCkInstrument->AddSubChunk(CHUNK_ID_INSH, 12);
948          uint8_t* pData = (uint8_t*) insh->LoadChunkData();          uint8_t* pData = (uint8_t*) insh->LoadChunkData();
949          // update 'insh' chunk          // update 'insh' chunk
950          Regions = pRegions->size();          Regions = (pRegions) ? pRegions->size() : 0;
951          midi_locale_t locale;          midi_locale_t locale;
952          locale.instrument = MIDIProgram;          locale.instrument = MIDIProgram;
953          locale.bank       = MIDI_BANK_ENCODE(MIDIBankCoarse, MIDIBankFine);          locale.bank       = MIDI_BANK_ENCODE(MIDIBankCoarse, MIDIBankFine);
# Line 942  namespace DLS { Line 956  namespace DLS {
956          memccpy(&pData[0], &Regions, 1, 4);          memccpy(&pData[0], &Regions, 1, 4);
957          memccpy(&pData[4], &locale, 2, 4);          memccpy(&pData[4], &locale, 2, 4);
958          // update Region's chunks          // update Region's chunks
959            if (!pRegions) return;
960          RegionList::iterator iter = pRegions->begin();          RegionList::iterator iter = pRegions->begin();
961          RegionList::iterator end  = pRegions->end();          RegionList::iterator end  = pRegions->end();
962          for (; iter != end; ++iter) {          for (; iter != end; ++iter) {
# Line 980  namespace DLS { Line 995  namespace DLS {
995       * to add samples, instruments and finally call Save() to actually write       * to add samples, instruments and finally call Save() to actually write
996       * a DLS file.       * a DLS file.
997       */       */
998      File::File() : pRIFF(new RIFF::File(RIFF_TYPE_DLS)), Resource(NULL, pRIFF) {      File::File() : Resource(NULL, pRIFF = new RIFF::File(RIFF_TYPE_DLS)) {
999          pVersion = new version_t;          pVersion = new version_t;
1000          pVersion->major   = 0;          pVersion->major   = 0;
1001          pVersion->minor   = 0;          pVersion->minor   = 0;
# Line 1089  namespace DLS { Line 1104  namespace DLS {
1104      }      }
1105    
1106      void File::LoadSamples() {      void File::LoadSamples() {
1107            if (!pSamples) pSamples = new SampleList;
1108          RIFF::List* wvpl = pRIFF->GetSubList(LIST_TYPE_WVPL);          RIFF::List* wvpl = pRIFF->GetSubList(LIST_TYPE_WVPL);
1109          if (wvpl) {          if (wvpl) {
1110              unsigned long wvplFileOffset = wvpl->GetFilePos();              unsigned long wvplFileOffset = wvpl->GetFilePos();
1111              RIFF::List* wave = wvpl->GetFirstSubList();              RIFF::List* wave = wvpl->GetFirstSubList();
1112              while (wave) {              while (wave) {
1113                  if (wave->GetListType() == LIST_TYPE_WAVE) {                  if (wave->GetListType() == LIST_TYPE_WAVE) {
                     if (!pSamples) pSamples = new SampleList;  
1114                      unsigned long waveFileOffset = wave->GetFilePos();                      unsigned long waveFileOffset = wave->GetFilePos();
1115                      pSamples->push_back(new Sample(this, wave, waveFileOffset - wvplFileOffset));                      pSamples->push_back(new Sample(this, wave, waveFileOffset - wvplFileOffset));
1116                  }                  }
# Line 1109  namespace DLS { Line 1124  namespace DLS {
1124                  RIFF::List* wave = dwpl->GetFirstSubList();                  RIFF::List* wave = dwpl->GetFirstSubList();
1125                  while (wave) {                  while (wave) {
1126                      if (wave->GetListType() == LIST_TYPE_WAVE) {                      if (wave->GetListType() == LIST_TYPE_WAVE) {
                         if (!pSamples) pSamples = new SampleList;  
1127                          unsigned long waveFileOffset = wave->GetFilePos();                          unsigned long waveFileOffset = wave->GetFilePos();
1128                          pSamples->push_back(new Sample(this, wave, waveFileOffset - dwplFileOffset));                          pSamples->push_back(new Sample(this, wave, waveFileOffset - dwplFileOffset));
1129                      }                      }
# Line 1127  namespace DLS { Line 1141  namespace DLS {
1141       * @returns pointer to new Sample object       * @returns pointer to new Sample object
1142       */       */
1143      Sample* File::AddSample() {      Sample* File::AddSample() {
1144           if (!pSamples) LoadSamples();
1145         __ensureMandatoryChunksExist();         __ensureMandatoryChunksExist();
1146         RIFF::List* wvpl = pRIFF->GetSubList(LIST_TYPE_WVPL);         RIFF::List* wvpl = pRIFF->GetSubList(LIST_TYPE_WVPL);
1147         // create new Sample object and its respective 'wave' list chunk         // create new Sample object and its respective 'wave' list chunk
        if (!pSamples) pSamples = new SampleList;  
1148         RIFF::List* wave = wvpl->AddSubList(LIST_TYPE_WAVE);         RIFF::List* wave = wvpl->AddSubList(LIST_TYPE_WAVE);
1149         Sample* pSample = new Sample(this, wave, 0 /*arbitrary value, we update offsets when we save*/);         Sample* pSample = new Sample(this, wave, 0 /*arbitrary value, we update offsets when we save*/);
1150         pSamples->push_back(pSample);         pSamples->push_back(pSample);
# Line 1145  namespace DLS { Line 1159  namespace DLS {
1159       * @param pSample - sample to delete       * @param pSample - sample to delete
1160       */       */
1161      void File::DeleteSample(Sample* pSample) {      void File::DeleteSample(Sample* pSample) {
1162            if (!pSamples) return;
1163          SampleList::iterator iter = find(pSamples->begin(), pSamples->end(), pSample);          SampleList::iterator iter = find(pSamples->begin(), pSamples->end(), pSample);
1164          if (iter == pSamples->end()) return;          if (iter == pSamples->end()) return;
1165          pSamples->erase(iter);          pSamples->erase(iter);
# Line 1165  namespace DLS { Line 1180  namespace DLS {
1180      }      }
1181    
1182      void File::LoadInstruments() {      void File::LoadInstruments() {
1183            if (!pInstruments) pInstruments = new InstrumentList;
1184          RIFF::List* lstInstruments = pRIFF->GetSubList(LIST_TYPE_LINS);          RIFF::List* lstInstruments = pRIFF->GetSubList(LIST_TYPE_LINS);
1185          if (lstInstruments) {          if (lstInstruments) {
1186              RIFF::List* lstInstr = lstInstruments->GetFirstSubList();              RIFF::List* lstInstr = lstInstruments->GetFirstSubList();
1187              while (lstInstr) {              while (lstInstr) {
1188                  if (lstInstr->GetListType() == LIST_TYPE_INS) {                  if (lstInstr->GetListType() == LIST_TYPE_INS) {
                     if (!pInstruments) pInstruments = new InstrumentList;  
1189                      pInstruments->push_back(new Instrument(this, lstInstr));                      pInstruments->push_back(new Instrument(this, lstInstr));
1190                  }                  }
1191                  lstInstr = lstInstruments->GetNextSubList();                  lstInstr = lstInstruments->GetNextSubList();
# Line 1186  namespace DLS { Line 1201  namespace DLS {
1201       * @returns pointer to new Instrument object       * @returns pointer to new Instrument object
1202       */       */
1203      Instrument* File::AddInstrument() {      Instrument* File::AddInstrument() {
1204           if (!pInstruments) LoadInstruments();
1205         __ensureMandatoryChunksExist();         __ensureMandatoryChunksExist();
        if (!pInstruments) pInstruments = new InstrumentList;  
1206         RIFF::List* lstInstruments = pRIFF->GetSubList(LIST_TYPE_LINS);         RIFF::List* lstInstruments = pRIFF->GetSubList(LIST_TYPE_LINS);
1207         RIFF::List* lstInstr = lstInstruments->AddSubList(LIST_TYPE_INS);         RIFF::List* lstInstr = lstInstruments->AddSubList(LIST_TYPE_INS);
1208         Instrument* pInstrument = new Instrument(this, lstInstr);         Instrument* pInstrument = new Instrument(this, lstInstr);
# Line 1195  namespace DLS { Line 1210  namespace DLS {
1210         return pInstrument;         return pInstrument;
1211      }      }
1212    
1213      /** @brief Delete a instrument.      /** @brief Delete an instrument.
1214       *       *
1215       * This will delete the given Instrument object from the DLS file. You       * This will delete the given Instrument object from the DLS file. You
1216       * have to call Save() to make this persistent to the file.       * have to call Save() to make this persistent to the file.
# Line 1203  namespace DLS { Line 1218  namespace DLS {
1218       * @param pInstrument - instrument to delete       * @param pInstrument - instrument to delete
1219       */       */
1220      void File::DeleteInstrument(Instrument* pInstrument) {      void File::DeleteInstrument(Instrument* pInstrument) {
1221            if (!pInstruments) return;
1222          InstrumentList::iterator iter = find(pInstruments->begin(), pInstruments->end(), pInstrument);          InstrumentList::iterator iter = find(pInstruments->begin(), pInstruments->end(), pInstrument);
1223          if (iter == pInstruments->end()) return;          if (iter == pInstruments->end()) return;
1224          pInstruments->erase(iter);          pInstruments->erase(iter);
# Line 1324  namespace DLS { Line 1340  namespace DLS {
1340      /**      /**
1341       * Updates (persistently) the wave pool table with offsets to all       * Updates (persistently) the wave pool table with offsets to all
1342       * currently available samples. <b>Caution:</b> this method assumes the       * currently available samples. <b>Caution:</b> this method assumes the
1343       * 'ptbl' chunk to be already of the correct size, so usually this       * 'ptbl' chunk to be already of the correct size and the file to be
1344       * method is only called after a Save() call.       * writable, so usually this method is only called after a Save() call.
1345       *       *
1346       * @throws Exception - if 'ptbl' chunk is too small (should only occur       * @throws Exception - if 'ptbl' chunk is too small (should only occur
1347       *                     if there's a bug)       *                     if there's a bug)
# Line 1335  namespace DLS { Line 1351  namespace DLS {
1351          RIFF::Chunk* ptbl = pRIFF->GetSubChunk(CHUNK_ID_PTBL);          RIFF::Chunk* ptbl = pRIFF->GetSubChunk(CHUNK_ID_PTBL);
1352          const int iOffsetSize = (b64BitWavePoolOffsets) ? 8 : 4;          const int iOffsetSize = (b64BitWavePoolOffsets) ? 8 : 4;
1353          // check if 'ptbl' chunk is large enough          // check if 'ptbl' chunk is large enough
1354          WavePoolCount = pSamples->size();          WavePoolCount = (pSamples) ? pSamples->size() : 0;
1355          const unsigned long ulRequiredSize = WavePoolHeaderSize + iOffsetSize * WavePoolCount;          const unsigned long ulRequiredSize = WavePoolHeaderSize + iOffsetSize * WavePoolCount;
1356          if (ptbl->GetSize() < ulRequiredSize) throw Exception("Fatal error, 'ptbl' chunk too small");          if (ptbl->GetSize() < ulRequiredSize) throw Exception("Fatal error, 'ptbl' chunk too small");
1357          uint8_t* pData = (uint8_t*) ptbl->LoadChunkData();          // save the 'ptbl' chunk's current read/write position
1358            unsigned long ulOriginalPos = ptbl->GetPos();
1359          // update headers          // update headers
1360          memccpy(&pData[0], &WavePoolHeaderSize, 1, 4);          ptbl->SetPos(0);
1361          memccpy(&pData[4], &WavePoolCount, 1, 4);          ptbl->WriteUint32(&WavePoolHeaderSize);
1362            ptbl->WriteUint32(&WavePoolCount);
1363          // update offsets          // update offsets
1364            ptbl->SetPos(WavePoolHeaderSize);
1365          if (b64BitWavePoolOffsets) {          if (b64BitWavePoolOffsets) {
1366              for (int i = 0 ; i < WavePoolCount ; i++) {              for (int i = 0 ; i < WavePoolCount ; i++) {
1367                  memccpy(&pData[WavePoolHeaderSize + i*iOffsetSize], &pWavePoolTableHi[i], 1, 4);                  ptbl->WriteUint32(&pWavePoolTableHi[i]);
1368                  memccpy(&pData[WavePoolHeaderSize + i*iOffsetSize], &pWavePoolTable[i],   1, 4);                  ptbl->WriteUint32(&pWavePoolTable[i]);
1369              }              }
1370          } else { // conventional 32 bit offsets          } else { // conventional 32 bit offsets
1371              for (int i = 0 ; i < WavePoolCount ; i++)              for (int i = 0 ; i < WavePoolCount ; i++)
1372                  memccpy(&pData[WavePoolHeaderSize + i*iOffsetSize], &pWavePoolTable[i], 1, 4);                  ptbl->WriteUint32(&pWavePoolTable[i]);
1373          }          }
1374            // restore 'ptbl' chunk's original read/write position
1375            ptbl->SetPos(ulOriginalPos);
1376      }      }
1377    
1378      /**      /**
# Line 1360  namespace DLS { Line 1381  namespace DLS {
1381       * exists already.       * exists already.
1382       */       */
1383      void File::__UpdateWavePoolTable() {      void File::__UpdateWavePoolTable() {
1384          WavePoolCount = pSamples->size();          WavePoolCount = (pSamples) ? pSamples->size() : 0;
1385          // resize wave pool table arrays          // resize wave pool table arrays
1386          if (pWavePoolTable)   delete[] pWavePoolTable;          if (pWavePoolTable)   delete[] pWavePoolTable;
1387          if (pWavePoolTableHi) delete[] pWavePoolTableHi;          if (pWavePoolTableHi) delete[] pWavePoolTableHi;
1388          pWavePoolTable   = new uint32_t[WavePoolCount];          pWavePoolTable   = new uint32_t[WavePoolCount];
1389          pWavePoolTableHi = new uint32_t[WavePoolCount];          pWavePoolTableHi = new uint32_t[WavePoolCount];
1390            if (!pSamples) return;
1391          // update offsets int wave pool table          // update offsets int wave pool table
1392          RIFF::List* wvpl = pRIFF->GetSubList(LIST_TYPE_WVPL);          RIFF::List* wvpl = pRIFF->GetSubList(LIST_TYPE_WVPL);
1393          uint64_t wvplFileOffset = wvpl->GetFilePos();          uint64_t wvplFileOffset = wvpl->GetFilePos();
# Line 1373  namespace DLS { Line 1395  namespace DLS {
1395              SampleList::iterator iter = pSamples->begin();              SampleList::iterator iter = pSamples->begin();
1396              SampleList::iterator end  = pSamples->end();              SampleList::iterator end  = pSamples->end();
1397              for (int i = 0 ; iter != end ; ++iter, i++) {              for (int i = 0 ; iter != end ; ++iter, i++) {
1398                  uint64_t _64BitOffset = wvplFileOffset - (*iter)->pWaveList->GetFilePos() - LIST_HEADER_SIZE;                  uint64_t _64BitOffset = (*iter)->pWaveList->GetFilePos() - wvplFileOffset - LIST_HEADER_SIZE;
1399                  (*iter)->ulWavePoolOffset = _64BitOffset;                  (*iter)->ulWavePoolOffset = _64BitOffset;
1400                  pWavePoolTableHi[i] = (uint32_t) (_64BitOffset >> 32);                  pWavePoolTableHi[i] = (uint32_t) (_64BitOffset >> 32);
1401                  pWavePoolTable[i]   = (uint32_t) _64BitOffset;                  pWavePoolTable[i]   = (uint32_t) _64BitOffset;
# Line 1382  namespace DLS { Line 1404  namespace DLS {
1404              SampleList::iterator iter = pSamples->begin();              SampleList::iterator iter = pSamples->begin();
1405              SampleList::iterator end  = pSamples->end();              SampleList::iterator end  = pSamples->end();
1406              for (int i = 0 ; iter != end ; ++iter, i++) {              for (int i = 0 ; iter != end ; ++iter, i++) {
1407                  uint64_t _64BitOffset = wvplFileOffset - (*iter)->pWaveList->GetFilePos() - LIST_HEADER_SIZE;                  uint64_t _64BitOffset = (*iter)->pWaveList->GetFilePos() - wvplFileOffset - LIST_HEADER_SIZE;
1408                  (*iter)->ulWavePoolOffset = _64BitOffset;                  (*iter)->ulWavePoolOffset = _64BitOffset;
1409                  pWavePoolTable[i] = (uint32_t) _64BitOffset;                  pWavePoolTable[i] = (uint32_t) _64BitOffset;
1410              }              }

Legend:
Removed from v.800  
changed lines
  Added in v.823

  ViewVC Help
Powered by ViewVC