1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-04-03 12:57:39 +02:00

Sample block cleanups (#657)

* Revert "[Bug 2533] New: Extreme space inefficiency importing silence from an AUP file"...

... It did not fix the symptoms.  Using a zero blob only gives temporary
in-memory space efficiency when adding a row to the database, not space savings
in the file.

This reverts commit d9047dfd25.

* Remove unused SampleBlockFactory::Get

* Eliminate some repetition and magic numbers

* Lower some common steps into GetSummary(); removed unused argument

* mSummary256Bytes and mSummary64kBytes not needed after initialization

* Satisfy sample and summary requests for silent blocks without using db
This commit is contained in:
Paul Licameli
2020-09-02 14:11:30 -04:00
committed by GitHub
parent b32670b0bc
commit 64c50e57da
3 changed files with 95 additions and 103 deletions

View File

@@ -38,14 +38,6 @@ SampleBlockFactoryPtr SampleBlockFactory::New( AudacityProject &project )
SampleBlockFactory::~SampleBlockFactory() = default;
SampleBlockPtr SampleBlockFactory::Get(SampleBlockID sbid)
{
auto result = DoGet(sbid);
if (!result)
THROW_INCONSISTENCY_EXCEPTION;
return result;
}
SampleBlockPtr SampleBlockFactory::Create(samplePtr src,
size_t numsamples,
sampleFormat srcformat)