6414 |
|
|
6415 |
SampleList::iterator tmp = SamplesIterator; |
SampleList::iterator tmp = SamplesIterator; |
6416 |
// remove all references to the sample |
// remove all references to the sample |
6417 |
for (Instrument* instrument = GetFirstInstrument() ; instrument ; |
size_t iIns = 0; |
6418 |
instrument = GetNextInstrument()) { |
for (Instrument* instrument = GetInstrument(iIns); instrument; |
6419 |
|
instrument = GetInstrument(++iIns)) |
6420 |
|
{ |
6421 |
size_t iRgn = 0; |
size_t iRgn = 0; |
6422 |
for (Region* region = instrument->GetRegionAt(iRgn); region; |
for (Region* region = instrument->GetRegionAt(iRgn); region; |
6423 |
region = instrument->GetRegionAt(++iRgn)) |
region = instrument->GetRegionAt(++iRgn)) |
6548 |
__notify_progress(pProgress, 1.0); // notify done |
__notify_progress(pProgress, 1.0); // notify done |
6549 |
} |
} |
6550 |
|
|
6551 |
|
/** |
6552 |
|
* Returns a pointer to the first <i>Instrument</i> object of the file, |
6553 |
|
* <i>NULL</i> otherwise. |
6554 |
|
* |
6555 |
|
* @deprecated This method is not reentrant-safe, use GetInstrument() |
6556 |
|
* instead. |
6557 |
|
*/ |
6558 |
Instrument* File::GetFirstInstrument() { |
Instrument* File::GetFirstInstrument() { |
6559 |
if (!pInstruments) LoadInstruments(); |
if (!pInstruments) LoadInstruments(); |
6560 |
if (!pInstruments) return NULL; |
if (!pInstruments) return NULL; |
6562 |
return static_cast<gig::Instrument*>( (InstrumentsIterator != pInstruments->end()) ? *InstrumentsIterator : NULL ); |
return static_cast<gig::Instrument*>( (InstrumentsIterator != pInstruments->end()) ? *InstrumentsIterator : NULL ); |
6563 |
} |
} |
6564 |
|
|
6565 |
|
/** |
6566 |
|
* Returns a pointer to the next <i>Instrument</i> object of the file, |
6567 |
|
* <i>NULL</i> otherwise. |
6568 |
|
* |
6569 |
|
* @deprecated This method is not reentrant-safe, use GetInstrument() |
6570 |
|
* instead. |
6571 |
|
*/ |
6572 |
Instrument* File::GetNextInstrument() { |
Instrument* File::GetNextInstrument() { |
6573 |
if (!pInstruments) return NULL; |
if (!pInstruments) return NULL; |
6574 |
InstrumentsIterator++; |
InstrumentsIterator++; |
7327 |
|
|
7328 |
memset(&pData[48], 0, sublen - 48); |
memset(&pData[48], 0, sublen - 48); |
7329 |
|
|
7330 |
for (Instrument* instrument = GetFirstInstrument() ; instrument ; |
size_t iIns = 0; |
7331 |
instrument = GetNextInstrument()) { |
for (Instrument* instrument = GetInstrument(iIns); instrument; |
7332 |
|
instrument = GetInstrument(++iIns)) |
7333 |
|
{ |
7334 |
int nbusedsamples = 0; |
int nbusedsamples = 0; |
7335 |
int nbusedchannels = 0; |
int nbusedchannels = 0; |
7336 |
int nbdimregions = 0; |
int nbdimregions = 0; |
7435 |
void File::UpdateFileOffsets() { |
void File::UpdateFileOffsets() { |
7436 |
DLS::File::UpdateFileOffsets(); |
DLS::File::UpdateFileOffsets(); |
7437 |
|
|
7438 |
for (Instrument* instrument = GetFirstInstrument(); instrument; |
size_t i = 0; |
7439 |
instrument = GetNextInstrument()) |
for (Instrument* instrument = GetInstrument(i); instrument; |
7440 |
|
instrument = GetInstrument(++i)) |
7441 |
{ |
{ |
7442 |
instrument->UpdateScriptFileOffsets(); |
instrument->UpdateScriptFileOffsets(); |
7443 |
} |
} |