1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 16:10:06 +02:00

Remove obsolete mentions of blockfiles in comments & incomplete types

This commit is contained in:
Paul Licameli 2020-07-20 18:58:22 -04:00
parent eaaa782730
commit bd6536f3c4
13 changed files with 22 additions and 32 deletions

View File

@ -38,8 +38,6 @@ class CommandHandler;
class AppCommandEvent; class AppCommandEvent;
class AudacityProject; class AudacityProject;
class AliasBlockFile;
class AudacityApp final : public wxApp { class AudacityApp final : public wxApp {
public: public:
AudacityApp(); AudacityApp();

View File

@ -402,7 +402,7 @@ writing audio.
*//****************************************************************//** *//****************************************************************//**
\class AudioIOListener \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. callbacks for these events.
*//****************************************************************//** *//****************************************************************//**

View File

@ -10,7 +10,7 @@
\class BenchmarkDialog \class BenchmarkDialog
\brief BenchmarkDialog is used for measuring performance and accuracy \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. // The chunks are the pieces we move around in the test.
// They are (and are supposed to be) a different size to // They are (and are supposed to be) a different size to
// the blocks that make the blockfiles. That way we get to // the blocks that make the sample blocks. That way we get to
// do some testing of when edit chunks cross blockfile boundaries. // 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") 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 ) ); .Format( nChunks, chunkSize, nChunks*chunkSize*sizeof(SampleType)/1048576.0 ) );

View File

@ -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 // 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. // 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 // 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). // original MeterPanel::UpdateDisplay(). New code is below the previous (now commented out).
// //
//const size_t kFramesPerBuffer = 4; //const size_t kFramesPerBuffer = 4;

View File

@ -908,7 +908,7 @@ sqlite3 *ProjectFileIO::CopyTo(const FilePath &destpath,
// Scan all clips within current track // Scan all clips within current track
for (const auto &clip : wt->GetAllClips()) for (const auto &clip : wt->GetAllClips())
{ {
// Scan all blockfiles within current clip // Scan all sample blocks within current clip
auto blocks = clip->GetSequenceBlockArray(); auto blocks = clip->GetSequenceBlockArray();
for (const auto &block : *blocks) for (const auto &block : *blocks)
{ {
@ -1121,7 +1121,7 @@ bool ProjectFileIO::ShouldVacuum(const std::shared_ptr<TrackList> &tracks)
// Scan all clips within current track // Scan all clips within current track
for (const auto &clip : wt->GetAllClips()) for (const auto &clip : wt->GetAllClips())
{ {
// Scan all blockfiles within current clip // Scan all sample blocks within current clip
auto blocks = clip->GetSequenceBlockArray(); auto blocks = clip->GetSequenceBlockArray();
for (const auto &block : *blocks) for (const auto &block : *blocks)
{ {

View File

@ -625,9 +625,8 @@ bool ProjectFileManager::SaveCopy(const FilePath &fileName /* = wxT("") */)
void ProjectFileManager::Reset() void ProjectFileManager::Reset()
{ {
// Lock all blocks in all tracks of the last saved version, so that // 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 // the sample blocks aren't deleted from the database when we destroy the
// in memory. After it's locked, DELETE the data structure so that // sample block objects in memory.
// there's no memory leak.
if (mLastSavedTracks) if (mLastSavedTracks)
{ {
auto &project = mProject; auto &project = mProject;
@ -684,9 +683,8 @@ void ProjectFileManager::VacuumProject()
auto &projectFileIO = ProjectFileIO::Get(project); auto &projectFileIO = ProjectFileIO::Get(project);
// Lock all blocks in all tracks of the last saved version, so that // 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 // the sample blocks aren't deleted from the database when we destroy the
// in memory. After it's locked, DELETE the data structure so that // sample block objects in memory.
// there's no memory leak.
if (mLastSavedTracks) if (mLastSavedTracks)
{ {
for (auto wt : mLastSavedTracks->Any<WaveTrack>()) for (auto wt : mLastSavedTracks->Any<WaveTrack>())
@ -976,6 +974,9 @@ void ProjectFileManager::OpenFile(const FilePath &fileNameArg, bool addtohistory
TrackFocus::Get( project ).Set( *tracks.Any().begin() ); TrackFocus::Get( project ).Set( *tracks.Any().begin() );
window.HandleResize(); window.HandleResize();
trackPanel.Refresh(false); 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, trackPanel.Update(); // force any repaint to happen now,
// else any asynch calls into the blockfile code will not have // else any asynch calls into the blockfile code will not have
// finished logging errors (if any) before the call to ProjectFSCK() // finished logging errors (if any) before the call to ProjectFSCK()

View File

@ -16,13 +16,13 @@
\brief A WaveTrack contains WaveClip(s). \brief A WaveTrack contains WaveClip(s).
A WaveClip contains a Sequence. A Sequence is primarily an A WaveClip contains a Sequence. A Sequence is primarily an
interface to an array of SeqBlock instances, corresponding to interface to an array of SeqBlock instances, corresponding to
the audio BlockFiles on disk. the audio sample blocks in the database.
Contrast with RingBuffer. Contrast with RingBuffer.
*//****************************************************************//** *//****************************************************************//**
\class SeqBlock \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. a start time. Element of a BlockArray.
*//*******************************************************************/ *//*******************************************************************/
@ -413,7 +413,7 @@ std::unique_ptr<Sequence> Sequence::Copy( const SampleBlockFactoryPtr &pFactory,
else else
--b0; --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) for (int bb = b0 + 1; bb < b1; ++bb)
AppendBlock(pUseFactory, mSampleFormat, AppendBlock(pUseFactory, mSampleFormat,
dest->mBlock, dest->mNumSamples, mBlock[bb]); 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 // Create a NEW track containing as much silence as we
// need to insert, and then call Paste to do the insertion. // 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); Sequence sTrack(mpFactory, mSampleFormat);

View File

@ -122,11 +122,8 @@ class PROFILE_DLL_API Sequence final : public XMLTagHandler{
bool GetErrorOpening() { return mErrorOpening; } bool GetErrorOpening() { return mErrorOpening; }
// //
// Lock/Unlock all of this sequence's BlockFiles, keeping them // Lock all of this sequence's sample blocks, keeping them
// from being moved. Call this if you want to copy a // from being destroyed when closing.
// track to a different DirManager. See BlockFile.h
// for details.
//
bool CloseLock();//should be called upon project close. bool CloseLock();//should be called upon project close.
// not balanced by unlocking calls. // not balanced by unlocking calls.

View File

@ -387,7 +387,7 @@ bool Track::LinkConsistencyCheck()
{ {
// Sanity checks for linked tracks; unsetting the linked property // Sanity checks for linked tracks; unsetting the linked property
// doesn't fix the problem, but it likely leaves us with orphaned // 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; bool err = false;
if (GetLinked()) if (GetLinked())
{ {

View File

@ -104,7 +104,7 @@ namespace {
// Scan all clips within current track // Scan all clips within current track
for(const auto &clip : wt->GetAllClips()) for(const auto &clip : wt->GetAllClips())
{ {
// Scan all blockfiles within current clip // Scan all sample blocks within current clip
auto blocks = clip->GetSequenceBlockArray(); auto blocks = clip->GetSequenceBlockArray();
for (const auto &block : *blocks) for (const auto &block : *blocks)
{ {

View File

@ -24,8 +24,6 @@
#include <vector> #include <vector>
class BlockArray; class BlockArray;
class BlockFile;
using BlockFilePtr = std::shared_ptr<BlockFile>;
class Envelope; class Envelope;
class ProgressDialog; class ProgressDialog;
class SampleBlockFactory; class SampleBlockFactory;

View File

@ -348,7 +348,7 @@ ProgressResult PCMImportFileHandle::Import(TrackFactory *trackFactory,
if (mFormat == int16Sample) if (mFormat == int16Sample)
block = SFCall<sf_count_t>(sf_readf_short, mFile.get(), (short *)srcbuffer.ptr(), block); block = SFCall<sf_count_t>(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 else
block = SFCall<sf_count_t>(sf_readf_float, mFile.get(), (float *)srcbuffer.ptr(), block); block = SFCall<sf_count_t>(sf_readf_float, mFile.get(), (float *)srcbuffer.ptr(), block);

View File

@ -18,8 +18,6 @@
#include <wx/msgdlg.h> // to inherit #include <wx/msgdlg.h> // to inherit
#include "wxPanelWrapper.h" // to inherit #include "wxPanelWrapper.h" // to inherit
class AliasBlockFile;
class AudacityProject; class AudacityProject;
class ErrorDialog /* not final */ : public wxDialogWrapper class ErrorDialog /* not final */ : public wxDialogWrapper