366 |
* is located, 0 otherwise |
* is located, 0 otherwise |
367 |
*/ |
*/ |
368 |
Sample::Sample(File* pFile, RIFF::List* waveList, unsigned long WavePoolOffset, unsigned long fileNo) : DLS::Sample((DLS::File*) pFile, waveList, WavePoolOffset) { |
Sample::Sample(File* pFile, RIFF::List* waveList, unsigned long WavePoolOffset, unsigned long fileNo) : DLS::Sample((DLS::File*) pFile, waveList, WavePoolOffset) { |
369 |
static const DLS::Info::FixedStringLength fixedStringLengths[] = { |
static const DLS::Info::string_length_t fixedStringLengths[] = { |
370 |
{ CHUNK_ID_INAM, 64 }, |
{ CHUNK_ID_INAM, 64 }, |
371 |
{ 0, 0 } |
{ 0, 0 } |
372 |
}; |
}; |
373 |
pInfo->FixedStringLengths = fixedStringLengths; |
pInfo->SetFixedStringLengths(fixedStringLengths); |
374 |
Instances++; |
Instances++; |
375 |
FileNo = fileNo; |
FileNo = fileNo; |
376 |
|
|
2924 |
// * |
// * |
2925 |
|
|
2926 |
Instrument::Instrument(File* pFile, RIFF::List* insList, progress_t* pProgress) : DLS::Instrument((DLS::File*)pFile, insList) { |
Instrument::Instrument(File* pFile, RIFF::List* insList, progress_t* pProgress) : DLS::Instrument((DLS::File*)pFile, insList) { |
2927 |
static const DLS::Info::FixedStringLength fixedStringLengths[] = { |
static const DLS::Info::string_length_t fixedStringLengths[] = { |
2928 |
{ CHUNK_ID_INAM, 64 }, |
{ CHUNK_ID_INAM, 64 }, |
2929 |
{ CHUNK_ID_ISFT, 12 }, |
{ CHUNK_ID_ISFT, 12 }, |
2930 |
{ 0, 0 } |
{ 0, 0 } |
2931 |
}; |
}; |
2932 |
pInfo->FixedStringLengths = fixedStringLengths; |
pInfo->SetFixedStringLengths(fixedStringLengths); |
2933 |
|
|
2934 |
// Initialization |
// Initialization |
2935 |
for (int i = 0; i < 128; i++) RegionKeyTable[i] = NULL; |
for (int i = 0; i < 128; i++) RegionKeyTable[i] = NULL; |
3227 |
// *************** File *************** |
// *************** File *************** |
3228 |
// * |
// * |
3229 |
|
|
3230 |
// File version 2.0, 1998-06-28 |
/// Reflects Gigasampler file format version 2.0 (1998-06-28). |
3231 |
const DLS::version_t File::VERSION_2 = { |
const DLS::version_t File::VERSION_2 = { |
3232 |
0, 2, 19980628 & 0xffff, 19980628 >> 16 |
0, 2, 19980628 & 0xffff, 19980628 >> 16 |
3233 |
}; |
}; |
3234 |
|
|
3235 |
// File version 3.0, 2003-03-31 |
/// Reflects Gigasampler file format version 3.0 (2003-03-31). |
3236 |
const DLS::version_t File::VERSION_3 = { |
const DLS::version_t File::VERSION_3 = { |
3237 |
0, 3, 20030331 & 0xffff, 20030331 >> 16 |
0, 3, 20030331 & 0xffff, 20030331 >> 16 |
3238 |
}; |
}; |
3239 |
|
|
3240 |
const DLS::Info::FixedStringLength File::FixedStringLengths[] = { |
static const DLS::Info::string_length_t _FileFixedStringLengths[] = { |
3241 |
{ CHUNK_ID_IARL, 256 }, |
{ CHUNK_ID_IARL, 256 }, |
3242 |
{ CHUNK_ID_IART, 128 }, |
{ CHUNK_ID_IART, 128 }, |
3243 |
{ CHUNK_ID_ICMS, 128 }, |
{ CHUNK_ID_ICMS, 128 }, |
3261 |
File::File() : DLS::File() { |
File::File() : DLS::File() { |
3262 |
*pVersion = VERSION_3; |
*pVersion = VERSION_3; |
3263 |
pGroups = NULL; |
pGroups = NULL; |
3264 |
pInfo->FixedStringLengths = FixedStringLengths; |
pInfo->SetFixedStringLengths(_FileFixedStringLengths); |
3265 |
pInfo->ArchivalLocation = String(256, ' '); |
pInfo->ArchivalLocation = String(256, ' '); |
3266 |
|
|
3267 |
// add some mandatory chunks to get the file chunks in right |
// add some mandatory chunks to get the file chunks in right |
3275 |
|
|
3276 |
File::File(RIFF::File* pRIFF) : DLS::File(pRIFF) { |
File::File(RIFF::File* pRIFF) : DLS::File(pRIFF) { |
3277 |
pGroups = NULL; |
pGroups = NULL; |
3278 |
pInfo->FixedStringLengths = FixedStringLengths; |
pInfo->SetFixedStringLengths(_FileFixedStringLengths); |
3279 |
} |
} |
3280 |
|
|
3281 |
File::~File() { |
File::~File() { |