Audacity
3.0.3
|
class to decode a particular file (one per file). Saves info such as filename and length (after the header is read.) More...
#include <ODDecodeFlacTask.h>
Public Member Functions | |
ODFlacDecoder (const wxString &fileName) | |
This should handle unicode converted to UTF-8 on mac/linux, but OD TODO:check on windows. More... | |
virtual | ~ODFlacDecoder () |
int | Decode (SampleBuffer &data, sampleFormat &format, sampleCount start, size_t len, unsigned int channel) override |
bool | ReadHeader () override |
ODFLACFile * | GetFlacFile () |
FLAC specific file (inherited from FLAC::Decoder::File) More... | |
Public Member Functions inherited from ODFileDecoder | |
ODFileDecoder (const wxString &fName) | |
This should handle unicode converted to UTF-8 on mac/linux, but OD TODO:check on windows. More... | |
virtual | ~ODFileDecoder () |
virtual bool | Init () |
virtual bool | SeekingAllowed () |
const wxString & | GetFileName () |
bool | IsInitialized () |
Private Attributes | |
sampleFormat | mFormat |
std::unique_ptr< ODFLACFile > | mFile |
ODLock | mFlacFileLock |
wxFFile | mHandle |
unsigned long | mSampleRate |
unsigned long | mNumChannels |
unsigned long | mBitsPerSample |
FLAC__uint64 | mNumSamples |
FLAC__uint64 | mSamplesDone |
sampleCount | mLastDecodeStartSample |
bool | mStreamInfoDone |
int | mUpdateResult |
WaveTrack ** | mChannels |
unsigned int | mTargetChannel |
unsigned int | mDecodeBufferWritePosition |
unsigned int | mDecodeBufferLen |
samplePtr | mDecodeBuffer |
Friends | |
class | ODFLACFile |
class | FLACImportFileHandle |
Additional Inherited Members | |
Protected Member Functions inherited from ODFileDecoder | |
void | MarkInitialized () |
Derived classes should call this after they have parsed the header. More... | |
Protected Attributes inherited from ODFileDecoder | |
bool | mInited |
ODLock | mInitedLock |
const wxString | mFName |
unsigned int | mSampleRate |
unsigned int | mNumSamples |
unsigned int | mNumChannels |
class to decode a particular file (one per file). Saves info such as filename and length (after the header is read.)
Definition at line 96 of file ODDecodeFlacTask.h.
|
inline |
This should handle unicode converted to UTF-8 on mac/linux, but OD TODO:check on windows.
Definition at line 101 of file ODDecodeFlacTask.h.
References mFile.
|
virtual |
Definition at line 270 of file ODDecodeFlacTask.cpp.
References mFile.
|
overridevirtual |
Decodes the samples for this blockfile from the real file into a float buffer. This is file specific, so subclasses must implement this only. the buffer was defined like samplePtr sampleData = NewSamples(mLen, floatSample); this->ReadData(sampleData, floatSample, 0, mLen); This class should call ReadHeader() first, so it knows the length, and can prepare the file object if it needs to.
Implements ODFileDecoder.
Definition at line 172 of file ODDecodeFlacTask.cpp.
References SampleBuffer::Allocate(), sampleCount::as_long_long(), format, mDecodeBuffer, mDecodeBufferLen, mDecodeBufferWritePosition, mFile, mFlacFileLock, mFormat, mLastDecodeStartSample, mTargetChannel, and SampleBuffer::ptr().
ODFLACFile * ODFlacDecoder::GetFlacFile | ( | ) |
FLAC specific file (inherited from FLAC::Decoder::File)
Definition at line 265 of file ODDecodeFlacTask.cpp.
References mFile.
|
overridevirtual |
Read header. Subclasses must override. Probably should save the info somewhere. Ideally called once per decoding of a file. This complicates the task because
Read header. Subclasses must override. Probably should save the info somewhere. Ideally called once per decoding of a file. This complicates the task because returns true if the file exists and the header was read alright.
Implements ODFileDecoder.
Definition at line 223 of file ODDecodeFlacTask.cpp.
References int16Sample, ODFileDecoder::MarkInitialized(), mFile, ODFileDecoder::mFName, mFormat, and mHandle.
|
friend |
Definition at line 122 of file ODDecodeFlacTask.h.
|
friend |
Definition at line 98 of file ODDecodeFlacTask.h.
|
private |
Definition at line 129 of file ODDecodeFlacTask.h.
Referenced by ODFLACFile::metadata_callback().
|
private |
Definition at line 135 of file ODDecodeFlacTask.h.
|
private |
Definition at line 139 of file ODDecodeFlacTask.h.
Referenced by Decode(), and ODFLACFile::write_callback().
|
private |
Definition at line 138 of file ODDecodeFlacTask.h.
Referenced by Decode(), and ODFLACFile::write_callback().
|
private |
Definition at line 137 of file ODDecodeFlacTask.h.
Referenced by Decode(), and ODFLACFile::write_callback().
|
private |
Definition at line 124 of file ODDecodeFlacTask.h.
Referenced by Decode(), GetFlacFile(), ODFlacDecoder(), ReadHeader(), and ~ODFlacDecoder().
|
private |
Definition at line 125 of file ODDecodeFlacTask.h.
Referenced by Decode().
|
private |
Definition at line 123 of file ODDecodeFlacTask.h.
Referenced by Decode(), ODFLACFile::metadata_callback(), ReadHeader(), and ODFLACFile::write_callback().
|
private |
Definition at line 126 of file ODDecodeFlacTask.h.
Referenced by ReadHeader().
|
private |
Definition at line 132 of file ODDecodeFlacTask.h.
Referenced by Decode().
|
private |
Definition at line 128 of file ODDecodeFlacTask.h.
Referenced by ODFLACFile::metadata_callback().
|
private |
Definition at line 130 of file ODDecodeFlacTask.h.
Referenced by ODFLACFile::metadata_callback().
|
private |
Definition at line 127 of file ODDecodeFlacTask.h.
Referenced by ODFLACFile::metadata_callback().
|
private |
Definition at line 131 of file ODDecodeFlacTask.h.
Referenced by ODFLACFile::write_callback().
|
private |
Definition at line 133 of file ODDecodeFlacTask.h.
Referenced by ODFLACFile::metadata_callback().
|
private |
Definition at line 136 of file ODDecodeFlacTask.h.
Referenced by Decode(), and ODFLACFile::write_callback().
|
private |
Definition at line 134 of file ODDecodeFlacTask.h.