6412 |
pSample->DeleteChunks(); |
pSample->DeleteChunks(); |
6413 |
delete pSample; |
delete pSample; |
6414 |
|
|
|
SampleList::iterator tmp = SamplesIterator; |
|
6415 |
// remove all references to the sample |
// remove all references to the sample |
6416 |
for (Instrument* instrument = GetFirstInstrument() ; instrument ; |
size_t iIns = 0; |
6417 |
instrument = GetNextInstrument()) { |
for (Instrument* instrument = GetInstrument(iIns); instrument; |
6418 |
|
instrument = GetInstrument(++iIns)) |
6419 |
|
{ |
6420 |
size_t iRgn = 0; |
size_t iRgn = 0; |
6421 |
for (Region* region = instrument->GetRegionAt(iRgn); region; |
for (Region* region = instrument->GetRegionAt(iRgn); region; |
6422 |
region = instrument->GetRegionAt(++iRgn)) |
region = instrument->GetRegionAt(++iRgn)) |
6429 |
} |
} |
6430 |
} |
} |
6431 |
} |
} |
|
SamplesIterator = tmp; // restore iterator |
|
6432 |
} |
} |
6433 |
|
|
6434 |
void File::LoadSamples() { |
void File::LoadSamples() { |
7325 |
|
|
7326 |
memset(&pData[48], 0, sublen - 48); |
memset(&pData[48], 0, sublen - 48); |
7327 |
|
|
7328 |
for (Instrument* instrument = GetFirstInstrument() ; instrument ; |
size_t iIns = 0; |
7329 |
instrument = GetNextInstrument()) { |
for (Instrument* instrument = GetInstrument(iIns); instrument; |
7330 |
|
instrument = GetInstrument(++iIns)) |
7331 |
|
{ |
7332 |
int nbusedsamples = 0; |
int nbusedsamples = 0; |
7333 |
int nbusedchannels = 0; |
int nbusedchannels = 0; |
7334 |
int nbdimregions = 0; |
int nbdimregions = 0; |
7433 |
void File::UpdateFileOffsets() { |
void File::UpdateFileOffsets() { |
7434 |
DLS::File::UpdateFileOffsets(); |
DLS::File::UpdateFileOffsets(); |
7435 |
|
|
7436 |
for (Instrument* instrument = GetFirstInstrument(); instrument; |
size_t i = 0; |
7437 |
instrument = GetNextInstrument()) |
for (Instrument* instrument = GetInstrument(i); instrument; |
7438 |
|
instrument = GetInstrument(++i)) |
7439 |
{ |
{ |
7440 |
instrument->UpdateScriptFileOffsets(); |
instrument->UpdateScriptFileOffsets(); |
7441 |
} |
} |