steghide 0.5.1
AudioDataImpl< Type, ValueType, SampleValueType > Class Template Reference

implementation of the AudioData-Interface

#include <AudioData.h>

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

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
 
SampleValuegetSampleValue (const SamplePos pos) const
 
void replaceSample (const SamplePos pos, const SampleValue *s)
 
- Public Member Functions inherited from AudioData
- Public Member Functions inherited from CvrStgObject

Private Member Functions

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

Private Attributes

std::vector< ValueType > Data
 
CvrStgFileTheCvrStgFile
 

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
 

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 )
inlinevirtual

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
posthe 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
inlineprivate

◆ 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
posthe position of the sample (must be in 0...getNumSamples()-1)
sthe 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: