/[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 55 by schoenebeck, Tue Apr 27 09:06:07 2004 UTC revision 317 by schoenebeck, Sat Dec 4 14:13:49 2004 UTC
# Line 414  namespace DLS { Line 414  namespace DLS {
414          WavePoolCount  = ptbl->ReadUint32();          WavePoolCount  = ptbl->ReadUint32();
415          pWavePoolTable = new uint32_t[WavePoolCount];          pWavePoolTable = new uint32_t[WavePoolCount];
416          ptbl->SetPos(headersize);          ptbl->SetPos(headersize);
417          ptbl->Read(pWavePoolTable, WavePoolCount, sizeof(uint32_t));  
418            // Check for 64 bit offsets (used in gig v3 files)
419            if (ptbl->GetSize() - headersize == WavePoolCount * 8) {
420                for (int i = 0 ; i < WavePoolCount ; i++) {
421                    // Just ignore the upper bits for now
422                    uint32_t upper = ptbl->ReadUint32();
423                    pWavePoolTable[i] = ptbl->ReadUint32();
424                    if (upper || (pWavePoolTable[i] & 0x80000000))
425                        throw DLS::Exception("Files larger than 2 GB not yet supported");
426                }
427            }
428            else ptbl->Read(pWavePoolTable, WavePoolCount, sizeof(uint32_t));
429    
430          pSamples     = NULL;          pSamples     = NULL;
431          pInstruments = NULL;          pInstruments = NULL;

Legend:
Removed from v.55  
changed lines
  Added in v.317

  ViewVC Help
Powered by ViewVC