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; |