diff --git a/src/AudacityApp.h b/src/AudacityApp.h index 6886d1d94..4b6e44629 100644 --- a/src/AudacityApp.h +++ b/src/AudacityApp.h @@ -38,8 +38,6 @@ class CommandHandler; class AppCommandEvent; class AudacityProject; -class AliasBlockFile; - class AudacityApp final : public wxApp { public: AudacityApp(); diff --git a/src/AudioIO.cpp b/src/AudioIO.cpp index 42dcf8bc3..210b6b022 100644 --- a/src/AudioIO.cpp +++ b/src/AudioIO.cpp @@ -402,7 +402,7 @@ writing audio. *//****************************************************************//** \class AudioIOListener -\brief Monitors record play start/stop and new blockfiles. Has +\brief Monitors record play start/stop and new sample blocks. Has callbacks for these events. *//****************************************************************//** diff --git a/src/Benchmark.cpp b/src/Benchmark.cpp index 12b91dd20..020e87127 100644 --- a/src/Benchmark.cpp +++ b/src/Benchmark.cpp @@ -10,7 +10,7 @@ \class BenchmarkDialog \brief BenchmarkDialog is used for measuring performance and accuracy -of the BlockFile system. +of sample block storage. *//*******************************************************************/ @@ -394,8 +394,8 @@ void BenchmarkDialog::OnRun( wxCommandEvent & WXUNUSED(event)) // The chunks are the pieces we move around in the test. // They are (and are supposed to be) a different size to - // the blocks that make the blockfiles. That way we get to - // do some testing of when edit chunks cross blockfile boundaries. + // the blocks that make the sample blocks. That way we get to + // do some testing of when edit chunks cross sample block boundaries. Printf( XO("Using %lld chunks of %lld samples each, for a total of %.1f MB.\n") .Format( nChunks, chunkSize, nChunks*chunkSize*sizeof(SampleType)/1048576.0 ) ); diff --git a/src/MixerBoard.cpp b/src/MixerBoard.cpp index be46e6356..9dfd88778 100644 --- a/src/MixerBoard.cpp +++ b/src/MixerBoard.cpp @@ -533,7 +533,7 @@ void MixerTrackCluster::UpdateMeter(const double t0, const double t1) // But I think it's got a good idea, of calling WaveTracks' GetMinMax and GetRMS // instead of passing in all the data and asking the meter to derive peak and rms. // May be worth revisiting as I think it should perform better, because it uses the min/max/rms - // stored in blockfiles, rather than calculating them, but for now, changing it to use the + // stored in sample blocks, rather than calculating them, but for now, changing it to use the // original MeterPanel::UpdateDisplay(). New code is below the previous (now commented out). // //const size_t kFramesPerBuffer = 4; diff --git a/src/ProjectFileIO.cpp b/src/ProjectFileIO.cpp index 589a23e7b..bd15b9b9f 100644 --- a/src/ProjectFileIO.cpp +++ b/src/ProjectFileIO.cpp @@ -908,7 +908,7 @@ sqlite3 *ProjectFileIO::CopyTo(const FilePath &destpath, // Scan all clips within current track for (const auto &clip : wt->GetAllClips()) { - // Scan all blockfiles within current clip + // Scan all sample blocks within current clip auto blocks = clip->GetSequenceBlockArray(); for (const auto &block : *blocks) { @@ -1121,7 +1121,7 @@ bool ProjectFileIO::ShouldVacuum(const std::shared_ptr &tracks) // Scan all clips within current track for (const auto &clip : wt->GetAllClips()) { - // Scan all blockfiles within current clip + // Scan all sample blocks within current clip auto blocks = clip->GetSequenceBlockArray(); for (const auto &block : *blocks) { diff --git a/src/ProjectFileManager.cpp b/src/ProjectFileManager.cpp index 69b17942a..7d520a8be 100644 --- a/src/ProjectFileManager.cpp +++ b/src/ProjectFileManager.cpp @@ -625,9 +625,8 @@ bool ProjectFileManager::SaveCopy(const FilePath &fileName /* = wxT("") */) void ProjectFileManager::Reset() { // Lock all blocks in all tracks of the last saved version, so that - // the blockfiles aren't deleted on disk when we DELETE the blockfiles - // in memory. After it's locked, DELETE the data structure so that - // there's no memory leak. + // the sample blocks aren't deleted from the database when we destroy the + // sample block objects in memory. if (mLastSavedTracks) { auto &project = mProject; @@ -684,9 +683,8 @@ void ProjectFileManager::VacuumProject() auto &projectFileIO = ProjectFileIO::Get(project); // Lock all blocks in all tracks of the last saved version, so that - // the blockfiles aren't deleted on disk when we DELETE the blockfiles - // in memory. After it's locked, DELETE the data structure so that - // there's no memory leak. + // the sample blocks aren't deleted from the database when we destroy the + // sample block objects in memory. if (mLastSavedTracks) { for (auto wt : mLastSavedTracks->Any()) @@ -976,6 +974,9 @@ void ProjectFileManager::OpenFile(const FilePath &fileNameArg, bool addtohistory TrackFocus::Get( project ).Set( *tracks.Any().begin() ); window.HandleResize(); trackPanel.Refresh(false); + + // ? Old rationale in this comment no longer applies in 3.0.0, with no + // more on-demand loading: trackPanel.Update(); // force any repaint to happen now, // else any asynch calls into the blockfile code will not have // finished logging errors (if any) before the call to ProjectFSCK() diff --git a/src/Sequence.cpp b/src/Sequence.cpp index c6f8bffe7..8d260c6fc 100644 --- a/src/Sequence.cpp +++ b/src/Sequence.cpp @@ -16,13 +16,13 @@ \brief A WaveTrack contains WaveClip(s). A WaveClip contains a Sequence. A Sequence is primarily an interface to an array of SeqBlock instances, corresponding to - the audio BlockFiles on disk. + the audio sample blocks in the database. Contrast with RingBuffer. *//****************************************************************//** \class SeqBlock -\brief Data structure containing pointer to a BlockFile and +\brief Data structure containing pointer to a sample block and a start time. Element of a BlockArray. *//*******************************************************************/ @@ -413,7 +413,7 @@ std::unique_ptr Sequence::Copy( const SampleBlockFactoryPtr &pFactory, else --b0; - // If there are blocks in the middle, use the blockfiles whole + // If there are blocks in the middle, use the blocks whole for (int bb = b0 + 1; bb < b1; ++bb) AppendBlock(pUseFactory, mSampleFormat, dest->mBlock, dest->mNumSamples, mBlock[bb]); @@ -688,8 +688,6 @@ void Sequence::InsertSilence(sampleCount s0, sampleCount len) // Create a NEW track containing as much silence as we // need to insert, and then call Paste to do the insertion. - // We make use of a SilentBlockFile, which takes up no - // space on disk. Sequence sTrack(mpFactory, mSampleFormat); diff --git a/src/Sequence.h b/src/Sequence.h index e37eca00e..b59e93e5f 100644 --- a/src/Sequence.h +++ b/src/Sequence.h @@ -122,11 +122,8 @@ class PROFILE_DLL_API Sequence final : public XMLTagHandler{ bool GetErrorOpening() { return mErrorOpening; } // - // Lock/Unlock all of this sequence's BlockFiles, keeping them - // from being moved. Call this if you want to copy a - // track to a different DirManager. See BlockFile.h - // for details. - // + // Lock all of this sequence's sample blocks, keeping them + // from being destroyed when closing. bool CloseLock();//should be called upon project close. // not balanced by unlocking calls. diff --git a/src/Track.cpp b/src/Track.cpp index c92daff50..59cfbefe5 100644 --- a/src/Track.cpp +++ b/src/Track.cpp @@ -387,7 +387,7 @@ bool Track::LinkConsistencyCheck() { // Sanity checks for linked tracks; unsetting the linked property // doesn't fix the problem, but it likely leaves us with orphaned - // blockfiles instead of much worse problems. + // sample blocks instead of much worse problems. bool err = false; if (GetLinked()) { diff --git a/src/UndoManager.cpp b/src/UndoManager.cpp index f606832e1..5582c23e7 100644 --- a/src/UndoManager.cpp +++ b/src/UndoManager.cpp @@ -104,7 +104,7 @@ namespace { // Scan all clips within current track for(const auto &clip : wt->GetAllClips()) { - // Scan all blockfiles within current clip + // Scan all sample blocks within current clip auto blocks = clip->GetSequenceBlockArray(); for (const auto &block : *blocks) { diff --git a/src/WaveClip.h b/src/WaveClip.h index 0ebc48514..d063fe075 100644 --- a/src/WaveClip.h +++ b/src/WaveClip.h @@ -24,8 +24,6 @@ #include class BlockArray; -class BlockFile; -using BlockFilePtr = std::shared_ptr; class Envelope; class ProgressDialog; class SampleBlockFactory; diff --git a/src/import/ImportPCM.cpp b/src/import/ImportPCM.cpp index 5dec66e65..4d3cf7af3 100644 --- a/src/import/ImportPCM.cpp +++ b/src/import/ImportPCM.cpp @@ -348,7 +348,7 @@ ProgressResult PCMImportFileHandle::Import(TrackFactory *trackFactory, if (mFormat == int16Sample) block = SFCall(sf_readf_short, mFile.get(), (short *)srcbuffer.ptr(), block); - //import 24 bit int as float and have the append function convert it. This is how PCMAliasBlockFile works too. + //import 24 bit int as float and have the append function convert it. This is how PCMAliasBlockFile worked too. else block = SFCall(sf_readf_float, mFile.get(), (float *)srcbuffer.ptr(), block); diff --git a/src/widgets/ErrorDialog.h b/src/widgets/ErrorDialog.h index 5b7f43ca8..0765afb2f 100644 --- a/src/widgets/ErrorDialog.h +++ b/src/widgets/ErrorDialog.h @@ -18,8 +18,6 @@ #include // to inherit #include "wxPanelWrapper.h" // to inherit -class AliasBlockFile; - class AudacityProject; class ErrorDialog /* not final */ : public wxDialogWrapper