#include <WavFile.h>
Inheritance diagram for WavFile:

Public Member Functions | |
| WavFile (void) | |
| WavFile (BinaryIO *io) | |
| ~WavFile (void) | |
| void | read (BinaryIO *io) |
| void | write (void) |
| std::list< CvrStgFile::Property > | getProperties (void) const |
| unsigned long | getNumSamples (void) const |
| void | replaceSample (const SamplePos pos, const SampleValue *s) |
| SampleValue * | getSampleValue (SamplePos pos) const |
| std::vector< SampleValueAdjacencyList * > | calcSVAdjacencyLists (const std::vector< SampleValue * > &svs) const |
| std::vector< MatchingAlgorithm * > | getMatchingAlgorithms (Graph *g, Matching *m) const |
| unsigned short | getBitsPerSample (void) const |
Private Member Functions | |
| void | readheaders (void) |
| void | readdata (void) |
| void | writeheaders (void) |
| void | writedata (void) |
| void | calcpos (SamplePos n, unsigned long *bytepos, unsigned short *firstbitpos) const |
| unsigned short | getFirstBitPosinSample (void) |
| unsigned short | getBytesPerSample (void) |
Private Attributes | |
| WavChunkHeader * | riffchhdr |
| char | id_wave [4] |
| WavFormatChunk * | FormatChunk |
| WavChunkHeader * | datachhdr |
| std::vector< unsigned char > | data_small |
| this std::vector contains the wav data if BitsPerSample <= 8 | |
| std::vector< int > | data_large |
| this std::vector contains the wav data if BitsPerSample >8 | |
| std::vector< WavChunkUnused * > | UnusedBeforeData |
| std::vector< BYTE > | UnusedAfterData |
Static Private Attributes | |
| static const signed short | FormatPCM = 1 |
| static const unsigned short | SamplesPerVertex = 2 |
| static const UWORD32 | Radius_small = 1 |
| static const UWORD32 | Radius_large = 20 |
| static const EmbValue | EmbValueModulus = 2 |
| WavFile::WavFile | ( | void | ) |
| WavFile::WavFile | ( | BinaryIO * | io | ) |
| WavFile::~WavFile | ( | void | ) |
| void WavFile::read | ( | BinaryIO * | io | ) | [virtual] |
Reimplemented from CvrStgFile.
| void WavFile::write | ( | void | ) | [virtual] |
Reimplemented from CvrStgFile.
| std::list< CvrStgFile::Property > WavFile::getProperties | ( | void | ) | const [virtual] |
Implements CvrStgFile.
| unsigned long WavFile::getNumSamples | ( | void | ) | const [virtual] |
get the number of samples in this CvrStgObject
Implements CvrStgObject.
| void WavFile::replaceSample | ( | const SamplePos | pos, | |
| const SampleValue * | s | |||
| ) | [virtual] |
replace a sample thus (possibly) altering the value of the bit returned by SampleValue->getBit()
| pos | the position of the sample (must be in 0...getNumSamples()-1) | |
| s | the sample value that should replace the current sample value (must be of correct type for this CvrStgObject) |
Implements CvrStgObject.
| SampleValue * WavFile::getSampleValue | ( | SamplePos | pos | ) | const [virtual] |
get the sample at position pos
| pos | the position of a sample (must be in 0...getNumSamples()-1) |
Implements CvrStgObject.
| std::vector< SampleValueAdjacencyList * > WavFile::calcSVAdjacencyLists | ( | const std::vector< SampleValue * > & | svs | ) | const [virtual] |
calculate a vector a SampleValueAdjacencyLists
| svs | a vector of unique(!) sample values where svs[i]->getLabel() == i holds for all i |
May be overridden in derived class to provide a faster version.
Reimplemented from CvrStgFile.
| std::vector< MatchingAlgorithm * > WavFile::getMatchingAlgorithms | ( | Graph * | g, | |
| Matching * | m | |||
| ) | const [virtual] |
get recommended list of matching algorithms
| m | an empty matching - will be used in construction of MatchingAlgorithm objects |
Reimplemented from CvrStgFile.
| unsigned short WavFile::getBitsPerSample | ( | void | ) | const |
| void WavFile::readheaders | ( | void | ) | [private] |
| void WavFile::readdata | ( | void | ) | [private] |
| void WavFile::writeheaders | ( | void | ) | [private] |
| void WavFile::writedata | ( | void | ) | [private] |
| void WavFile::calcpos | ( | SamplePos | n, | |
| unsigned long * | bytepos, | |||
| unsigned short * | firstbitpos | |||
| ) | const [private] |
| unsigned short WavFile::getFirstBitPosinSample | ( | void | ) | [private] |
get the position of the first bit (of the first byte) containing the actual sample data
| unsigned short WavFile::getBytesPerSample | ( | void | ) | [private] |
const signed short WavFile::FormatPCM = 1 [static, private] |
const unsigned short WavFile::SamplesPerVertex = 2 [static, private] |
Reimplemented from CvrStgFile.
const UWORD32 WavFile::Radius_small = 1 [static, private] |
const UWORD32 WavFile::Radius_large = 20 [static, private] |
const EmbValue WavFile::EmbValueModulus = 2 [static, private] |
Reimplemented from CvrStgFile.
WavChunkHeader* WavFile::riffchhdr [private] |
char WavFile::id_wave[4] [private] |
WavFormatChunk* WavFile::FormatChunk [private] |
WavChunkHeader* WavFile::datachhdr [private] |
std::vector<unsigned char> WavFile::data_small [private] |
std::vector<int> WavFile::data_large [private] |
std::vector<WavChunkUnused*> WavFile::UnusedBeforeData [private] |
std::vector<BYTE> WavFile::UnusedAfterData [private] |
1.5.1