mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-15 09:01:12 +01:00
More uses of SampleBuffer, eliminating explicit DeleteSamples calls
This commit is contained in:
@@ -202,11 +202,13 @@ static void RemoveDependencies(AudacityProject *project,
|
||||
|
||||
// Convert it from an aliased file to an actual file in the project.
|
||||
unsigned int len = aliasBlockFile->GetLength();
|
||||
samplePtr buffer = NewSamples(len, format);
|
||||
f->ReadData(buffer, format, 0, len);
|
||||
BlockFile *newBlockFile =
|
||||
dirManager->NewSimpleBlockFile(buffer, len, format);
|
||||
DeleteSamples(buffer);
|
||||
BlockFile *newBlockFile;
|
||||
{
|
||||
SampleBuffer buffer(len, format);
|
||||
f->ReadData(buffer.ptr(), format, 0, len);
|
||||
newBlockFile =
|
||||
dirManager->NewSimpleBlockFile(buffer.ptr(), len, format);
|
||||
}
|
||||
|
||||
// Update our hash so we know what block files we've done
|
||||
blockFileHash[f] = newBlockFile;
|
||||
|
||||
Reference in New Issue
Block a user