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 <ODDecodeBlockFile.h>
Public Member Functions | |
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 | ReadHeader ()=0 |
virtual bool | Init () |
virtual bool | SeekingAllowed () |
virtual int | Decode (SampleBuffer &data, sampleFormat &format, sampleCount start, size_t len, unsigned int channel)=0 |
const wxString & | GetFileName () |
bool | IsInitialized () |
Protected Member Functions | |
void | MarkInitialized () |
Derived classes should call this after they have parsed the header. More... | |
Protected Attributes | |
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 193 of file ODDecodeBlockFile.h.
ODFileDecoder::ODFileDecoder | ( | const wxString & | fName | ) |
This should handle unicode converted to UTF-8 on mac/linux, but OD TODO:check on windows.
Definition at line 538 of file ODDecodeBlockFile.cpp.
|
virtual |
Definition at line 544 of file ODDecodeBlockFile.cpp.
|
pure virtual |
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 should be created by the ODFileDecoder implementing this method. It should set the format parameter so that the client code can deal with it. This class should call ReadHeader() first, so it knows the length, and can prepare the file object if it needs to. returns negative value for failure, 0 or positive value for success.
Implemented in ODFlacDecoder.
Referenced by ODDecodeBlockFile::WriteODDecodeBlockFile().
|
inline |
|
inlinevirtual |
Definition at line 203 of file ODDecodeBlockFile.h.
References ReadHeader().
Referenced by ODDecodeTask::DoSomeInternal().
bool ODFileDecoder::IsInitialized | ( | ) |
Definition at line 548 of file ODDecodeBlockFile.cpp.
References mInited, and mInitedLock.
Referenced by ODDecodeTask::DoSomeInternal().
|
protected |
Derived classes should call this after they have parsed the header.
Definition at line 558 of file ODDecodeBlockFile.cpp.
References mInited, and mInitedLock.
Referenced by ODFlacDecoder::ReadHeader().
|
pure virtual |
Read header. Subclasses must override. Probably should save the info somewhere. Ideally called once per decoding of a file. This complicates the task because
Implemented in ODFlacDecoder.
Referenced by Init().
|
inlinevirtual |
Definition at line 205 of file ODDecodeBlockFile.h.
|
protected |
Definition at line 227 of file ODDecodeBlockFile.h.
Referenced by GetFileName(), and ODFlacDecoder::ReadHeader().
|
protected |
Definition at line 224 of file ODDecodeBlockFile.h.
Referenced by IsInitialized(), and MarkInitialized().
|
protected |
Definition at line 225 of file ODDecodeBlockFile.h.
Referenced by IsInitialized(), and MarkInitialized().
|
protected |
Definition at line 231 of file ODDecodeBlockFile.h.
|
protected |
Definition at line 230 of file ODDecodeBlockFile.h.
|
protected |
Definition at line 229 of file ODDecodeBlockFile.h.