/[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 11 by schoenebeck, Sun Nov 16 17:47:00 2003 UTC revision 317 by schoenebeck, Sat Dec 4 14:13:49 2004 UTC
# Line 2  Line 2 
2   *                                                                         *   *                                                                         *
3   *   libgig - C++ cross-platform Gigasampler format file loader library    *   *   libgig - C++ cross-platform Gigasampler format file loader library    *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003 by Christian Schoenebeck                           *   *   Copyright (C) 2003, 2004 by Christian Schoenebeck                     *
6   *                         <cuse@users.sourceforge.net>                    *   *                               <cuse@users.sourceforge.net>              *
7   *                                                                         *   *                                                                         *
8   *   This library is free software; you can redistribute it and/or modify  *   *   This library is free software; you can redistribute it and/or modify  *
9   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# 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.11  
changed lines
  Added in v.317

  ViewVC Help
Powered by ViewVC