Audacity
3.0.3
|
Audacity 1.1.0 block file format: More...
#include <LegacyBlockFile.h>
Public Member Functions | |
LegacyBlockFile (wxFileNameWrapper &&existingFile, sampleFormat format, size_t summaryLen, size_t len, bool noRMS) | |
Create the memory structure to refer to the given block file. More... | |
virtual | ~LegacyBlockFile () |
bool | ReadSummary (ArrayOf< char > &data) override |
Read the summary section of the disk file. More... | |
size_t | ReadData (samplePtr data, sampleFormat format, size_t start, size_t len, bool mayThrow) const override |
Read the data section of the disk file. More... | |
BlockFilePtr | Copy (wxFileNameWrapper &&newFileName) override |
Create a NEW block file identical to this one. More... | |
void | SaveXML (XMLWriter &xmlFile) override |
Write an XML representation of this file. More... | |
DiskByteCount | GetSpaceUsage () const override |
void | Recover () override |
Static Public Member Functions | |
static BlockFilePtr | BuildFromXML (const FilePath &dir, const wxChar **attrs, size_t len, sampleFormat format) |
static More... | |
Protected Attributes | |
sampleFormat | mFormat |
Audacity 1.1.0 block file format:
Definition at line 34 of file LegacyBlockFile.h.
LegacyBlockFile::LegacyBlockFile | ( | wxFileNameWrapper && | existingFile, |
sampleFormat | format, | ||
size_t | summaryLen, | ||
size_t | len, | ||
bool | noRMS | ||
) |
Create the memory structure to refer to the given block file.
Construct a LegacyBlockFile memory structure that will point to an existing block file. This file must exist and be a valid block file.
existingFile | The disk file this LegacyBlockFile should use. |
Definition at line 126 of file LegacyBlockFile.cpp.
|
virtual |
Definition at line 148 of file LegacyBlockFile.cpp.
|
static |
static
Definition at line 223 of file LegacyBlockFile.cpp.
References format, XMLValueChecker::IsGoodFileName(), and XMLValueChecker::IsGoodInt().
|
override |
Create a NEW block file identical to this one.
Create a copy of this BlockFile, but using a different disk file.
newFileName | The name of the NEW file to use. |
Definition at line 265 of file LegacyBlockFile.cpp.
References mFormat.
|
override |
Definition at line 273 of file LegacyBlockFile.cpp.
|
override |
Read the data section of the disk file.
Read the data portion of the block file using libsndfile. Convert it to the given format if it is not already.
data | The buffer where the data will be stored |
format | The format the data will be stored in |
start | The offset in this block file |
len | The number of samples to read |
Definition at line 195 of file LegacyBlockFile.cpp.
References format, mFormat, and SAMPLE_SIZE.
|
override |
Read the summary section of the disk file.
Read the summary section of the disk file. Fill with zeroes and return false if data are unavailable for any reason.
*data | The buffer to write the data to. It must be at least mSummaryinfo.totalSummaryBytes long. |
Definition at line 157 of file LegacyBlockFile.cpp.
References Optional< X >::emplace(), and ArrayOf< X >::reinit().
|
override |
Definition at line 279 of file LegacyBlockFile.cpp.
|
override |
Write an XML representation of this file.
Definition at line 205 of file LegacyBlockFile.cpp.
References XMLWriter::EndTag(), XMLWriter::StartTag(), and XMLWriter::WriteAttr().
|
protected |
Definition at line 67 of file LegacyBlockFile.h.
Referenced by Copy(), and ReadData().