|
Audacity
3.0.3
|
Go to the documentation of this file.
36 #ifndef __AUDACITY_ODPCMALIASBLOCKFILE__
37 #define __AUDACITY_ODPCMALIASBLOCKFILE__
48 size_t aliasLen,
int aliasChannel);
51 size_t aliasLen,
int aliasChannel,
52 float min,
float max,
float rms,
bool summaryAvailable);
65 size_t start,
size_t len,
bool mayThrow)
const override;
69 bool Read256(
float *buffer,
size_t start,
size_t len)
override;
71 bool Read64K(
float *buffer,
size_t start,
size_t len)
override;
80 static BlockFilePtr
BuildFromXML(DirManager &dm,
const wxChar **attrs);
117 size_t start,
size_t len,
bool mayThrow)
const override;
Base class for XMLFileWriter and XMLStringWriter that provides the general functionality for creating...
An AliasBlockFile that references uncompressed data in an existing file.
sampleCount mStart
for reporting after task is complete. Only for display use.
ODLock mAliasedFileNameMutex
Also need to protect the aliased file name.
BlockFilePtr Copy(wxFileNameWrapper &&fileName) override
Makes NEW ODPCMAliasBlockFile or PCMAliasBlockFile depending on summary availability.
size_t ReadData(samplePtr data, sampleFormat format, size_t start, size_t len, bool mayThrow) const override
Reads the specified data from the aliased file using libsndfile.
DiskByteCount GetSpaceUsage() const override
bool IsSummaryAvailable() const override
An AliasBlockFile that references uncompressed data in an existing file.
ODPCMAliasBlockFile(wxFileNameWrapper &&baseFileName, wxFileNameWrapper &&aliasedFileName, sampleCount aliasStart, size_t aliasLen, int aliasChannel)
Constructs a PCMAliasBlockFile, writing the summary to disk.
bool mSummaryBeingComputed
void DoWriteSummary()
A public interface to WriteSummary.
bool IsSummaryBeingComputed() override
Returns TRUE if the summary has not yet been written, but is actively being computed and written to d...
ODLock mSummaryAvailableMutex
void SetClipOffset(sampleCount numSamples)
sets the amount of samples the clip associated with this blockfile is offset in the wavetrack (non ef...
bool Read64K(float *buffer, size_t start, size_t len) override
Returns the 64K summary data block.
static BlockFilePtr BuildFromXML(DirManager &dm, const wxChar **attrs)
Reconstructs from XML a ODPCMAliasBlockFile and reschedules it for OD loading.
const TranslatableString name
GetFileNameResult GetFileName() const override
sets the file name the summary info will be saved in. threadsafe.
void * CalcSummary(samplePtr buffer, size_t len, sampleFormat format, ArrayOf< char > &cleanup) override
MinMaxRMS GetMinMaxRMS(size_t start, size_t len, bool mayThrow) const override
Gets extreme values for the specified region.
void CloseLock() override
sampleCount GetGlobalStart() const
void SetFileName(wxFileNameWrapper &&name) override
sets the file name the summary info will be saved in. threadsafe.
void UnlockRead() const override
Allows reading on other threads.
Positions or offsets within audio files need a wide type.
bool Read256(float *buffer, size_t start, size_t len) override
Returns the 256 byte summary data block.
void Unlock() override
Unlocks the blockfile only if it has a file that exists.
void Recover(void) override
Writes the summary file if summary data is available.
bool ReadSummary(ArrayOf< char > &data) override
Read the summary into a buffer.
void Lock() override
Locks the blockfile only if it has a file that exists.
ODLock mWriteSummaryMutex
sampleCount GetGlobalEnd() const
void WriteSummary() override
Write the summary to disk, using the derived ReadData() to get the data.
sampleCount GetClipOffset() const
Gets the number of samples the clip associated with this blockfile is offset by.
void SaveXML(XMLWriter &xmlFile) override
Saves as xml ODPCMAliasBlockFile or PCMAliasBlockFile depending on summary availability.
sampleCount GetStart() const
Gets the value that indicates where the first sample in this block corresponds to the global sequence...
virtual ~ODPCMAliasBlockFile()
sampleCount mClipOffset
the ODTask needs to know where this blockfile lies in the track, so for convenience,...
void LockRead() const override
Prevents a read on other threads.
void SetStart(sampleCount startSample)
Sets the value that indicates where the first sample in this block corresponds to the global sequence...