AudioDataImpl< Type, ValueType, SampleValueType > Class Template Reference

implementation of the AudioData-Interface

`#include <AudioData.h>`

Inheritance diagram for AudioDataImpl< Type, ValueType, SampleValueType >:

## Public Member Functions

| AudioDataImpl (CvrStgFile *f)
virtual | ~AudioDataImpl (void)
void | read (BinaryIO *io, UWORD32 n=AudioData::NoLimit)
void | write (BinaryIO *io, UWORD32 n=AudioData::NoLimit)
unsigned long | getNumSamples (void) const
SampleValue * | getSampleValue (const SamplePos pos) const
void | replaceSample (const SamplePos pos, const SampleValue *s)

## Private Member Functions

ValueType | readValue (BinaryIO *io) const
void | writeValue (BinaryIO *io, ValueType v) const

## Private Attributes

std::vector< ValueType > | Data
CvrStgFile * | TheCvrStgFile

## Additional Inherited Members

Static Public Attributes inherited from AudioData
static const UWORD32 | NoLimit = 0
| constant that can be used as parameter to read and write to indicate that there is no limit More...

## Constructor & Destructor Documentation

## AudioDataImpl()

template<AUDIOSAMPLETYPE Type, class ValueType , class SampleValueType = AudioSampleValue<Type,ValueType>>

AudioDataImpl< Type, ValueType, SampleValueType >::AudioDataImpl | ( | CvrStgFile * | f | ) |

inline

## ~AudioDataImpl()

template<AUDIOSAMPLETYPE Type, class ValueType , class SampleValueType = AudioSampleValue<Type,ValueType>>

virtual AudioDataImpl< Type, ValueType, SampleValueType >::~AudioDataImpl | ( | void |  | ) |

inline virtual

## Member Function Documentation

## getNumSamples()

template<AUDIOSAMPLETYPE Type, class ValueType , class SampleValueType >

unsigned long AudioDataImpl< Type, ValueType, SampleValueType >::getNumSamples | ( | void |  | ) | const

virtual

get the number of samples in this CvrStgObject

Implements CvrStgObject.

## getSampleValue()

template<AUDIOSAMPLETYPE Type, class ValueType , class SampleValueType >

SampleValue * AudioDataImpl< Type, ValueType, SampleValueType >::getSampleValue | ( | const SamplePos | pos | ) | const

virtual

get the sample at position pos

Parameters

  pos | the position of a sample (must be in 0...getNumSamples()-1)

Returns
  the sample at the given position

The sample object is created in this function and should be deleted by the caller. The derived class should check the condition(s) given above in its Implementation of this function.

Implements CvrStgObject.

## read()

template<AUDIOSAMPLETYPE Type, class ValueType , class SampleValueType >

void AudioDataImpl< Type, ValueType, SampleValueType >::read | ( | BinaryIO * | io,
|  | UWORD32 | n = `AudioData::NoLimit`
| ) |  |

virtual

Implements AudioData.

## readValue()

SWORD32 AuPCM32AudioData::readValue | ( | BinaryIO * | io | ) | const

inline private

## replaceSample()

template<AUDIOSAMPLETYPE Type, class ValueType , class SampleValueType >

void AudioDataImpl< Type, ValueType, SampleValueType >::replaceSample | ( | const SamplePos | pos,
|  | const SampleValue * | s
| ) |  |

virtual

replace a sample thus (possibly) altering the value of the bit returned by SampleValue->getBit()

Parameters

  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)

The derived class should check the condition(s) given above in its Implementation of this function.

Implements CvrStgObject.

## write()

template<AUDIOSAMPLETYPE Type, class ValueType , class SampleValueType >

void AudioDataImpl< Type, ValueType, SampleValueType >::write | ( | BinaryIO * | io,
|  | UWORD32 | n = `AudioData::NoLimit`
| ) |  |

virtual

Implements AudioData.

## writeValue()

template<AUDIOSAMPLETYPE Type, class ValueType , class SampleValueType = AudioSampleValue<Type,ValueType>>

void AudioDataImpl< Type, ValueType, SampleValueType >::writeValue | ( | BinaryIO * | io,
|  | ValueType | v
| ) |  | const

private

## Member Data Documentation

## Data

template<AUDIOSAMPLETYPE Type, class ValueType , class SampleValueType = AudioSampleValue<Type,ValueType>>

std::vector<ValueType> AudioDataImpl< Type, ValueType, SampleValueType >::Data

private

## TheCvrStgFile

template<AUDIOSAMPLETYPE Type, class ValueType , class SampleValueType = AudioSampleValue<Type,ValueType>>

CvrStgFile* AudioDataImpl< Type, ValueType, SampleValueType >::TheCvrStgFile

private

The documentation for this class was generated from the following files:

- AudioData.h
- AuData.h