iso::synth::Frame Class Reference

storage for audio data that contains one frame of samples More...

#include <iso_synth_frame.h>

Inherits iso::synth::Buffer.

Inheritance diagram for iso::synth::Frame:

Inheritance graph
[legend]
Collaboration diagram for iso::synth::Frame:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Frame ()
 default contructor
 Frame (sample pValue)
 paramater based contructor
 Frame (unsigned int pChannelCount)
 paramater based contructor
 Frame (int pChannelCount)
 paramater based contructor
 Frame (unsigned int pChannelCount, sample pValue)
 paramater based contructor
 Frame (unsigned int pChannelCount, const sample *pValues)
 paramater based contructor
 Frame (unsigned int pChannelCount, double pValue1, double pValue2,...)
 paramater based contructor
 Frame (const Frame &pFrame)
 copy constructor
 Frame (const math::Vector< sample > &pVector)
 copy constructor
 Frame (const Buffer &pBuffer, unsigned int pFrameIndex) throw (SynthException)
 copy constructor
 Frame (const serialize::SerializeData &pSerializeData) throw (serialize::SerializeException)
 serialization based constructor
 ~Frame ()
 destructor
virtual serialize::SerializeData serialize (const String &pSerialName=sClassName) const
 create serializeData for frame
void copyTo (Buffer &pBuffer, unsigned int pFrameIndex) throw (SynthException)
 copy frame into buffer
void copyFrom (Buffer &pBuffer, unsigned int pFrameIndex) throw (SynthException)
 copy buffer into frame
const Frameoperator= (const Frame &pFrame) throw (SynthException)
 assignment operator
const Bufferoperator= (const Buffer &pBuffer) throw (SynthException)
 assignment operator
sample operator= (sample pValue)
 set content of buffer to one value
bool operator== (const Frame &pFrame) const
 comparison operator
bool operator== (const Buffer &pBuffer) const
 comparison operator
sampleoperator[] (unsigned int pChannelIndex) throw (SynthException)
 returns sample
const sampleoperator[] (unsigned int pChannelIndex) const throw (SynthException)
 returns sample
const Frameoperator+= (sample pvalue)
 += operator
const Frameoperator+= (const Frame &pFrame) throw (SynthException)
 += operator
const Frameoperator+= (const Buffer &pBuffer) throw (SynthException)
 += operator
const Frameoperator *= (sample pValue)
 *= operator
const Frameoperator *= (const Frame &pFrame) throw (SynthException)
 *= operator
const Frameoperator *= (const Buffer &pBuffer) throw (SynthException)
 *= operator
virtual void setSize (unsigned int pFrameCount, unsigned int pChannelCount) throw (SynthException)
 change buffer size
virtual void setFrameCount (unsigned int pFrameCount) throw (SynthException)
 change number of frames
void appendFrames (const Buffer &pBuffer) throw (SynthException)
 append frames from pBuffer to frame
String info () const
 obtain textual frame information

Static Public Member Functions

static serialize::Serializable * deSerialize (const serialize::SerializeData &pSerializeData) throw (serialize::SerializeException)
 create frame from SerializeData

Static Public Attributes

static const String sClassName
 default name

Friends

std::ostream & operator<< (std::ostream &pOstream, const Frame &pFrame)
 print frame information

Detailed Description

storage for audio data that contains one frame of samples

audio data that contains one frame of samples

Created by Daniel Bisig on 06/18/06.


Constructor & Destructor Documentation

Frame::Frame (  ) 

default contructor

Frame::Frame ( sample  pValue  ) 

paramater based contructor

Parameters:
pValue value to fill frame with

Frame::Frame ( unsigned int  pChannelCount  )  [explicit]

paramater based contructor

Parameters:
pChannelCount channel count

Frame::Frame ( int  pChannelCount  )  [explicit]

paramater based contructor

Parameters:
pChannelCount channel count
to avoid implicit casting conflicts with Frame( sample pValue );

Frame::Frame ( unsigned int  pChannelCount,
sample  pValue 
)

paramater based contructor

Parameters:
pChannelCount channel count
pValue value to fill frame with

Frame::Frame ( unsigned int  pChannelCount,
const sample pValues 
)

paramater based contructor

Parameters:
pChannelCount channel count
pValues values to fill frame with

Frame::Frame ( unsigned int  pChannelCount,
double  pValue1,
double  pValue2,
  ... 
)

paramater based contructor

Parameters:
pChannelCount channel count
pValue1 first value of a series of values to fill frame with
pValue2 second value of a series of values to fill frame with

Frame::Frame ( const Frame pFrame  ) 

copy constructor

Parameters:
pFrame frame to copy properties from

Frame::Frame ( const math::Vector< sample > &  pVector  ) 

copy constructor

Parameters:
pVector vector to copy properties from

Frame::Frame ( const Buffer pBuffer,
unsigned int  pFrameIndex 
) throw (SynthException)

copy constructor

Parameters:
pBuffer buffer to copy properties from
pFrameIndex frame index of buffer
Exceptions:
SynthException frame index out of range

Frame::Frame ( const serialize::SerializeData &  pSerializeData  )  throw (serialize::SerializeException)

serialization based constructor

Parameters:
pSerializeData serialization data
Exceptions:
SerializeException failed to create frame

Frame::~Frame (  ) 

destructor


Member Function Documentation

serialize::SerializeData Frame::serialize ( const String pSerialName = sClassName  )  const [virtual]

create serializeData for frame

Returns:
serializeData

Reimplemented from iso::synth::Buffer.

serialize::Serializable * Frame::deSerialize ( const serialize::SerializeData &  pSerializeData  )  throw (serialize::SerializeException) [static]

create frame from SerializeData

Parameters:
pSerializeData SerializeData
Returns:
Serializable
Exceptions:
SerializeException incompatible SerializeData

Reimplemented from iso::synth::Buffer.

void Frame::copyTo ( Buffer pBuffer,
unsigned int  pFrameIndex 
) throw (SynthException)

copy frame into buffer

Parameters:
pBuffer target buffer
pFrameIndex target frame
Exceptions:
SynthException frame out of bounds or channelCount doesn't match

void Frame::copyFrom ( Buffer pBuffer,
unsigned int  pFrameIndex 
) throw (SynthException)

copy buffer into frame

Parameters:
pBuffer source buffer
pFrameIndex source frame
Exceptions:
SynthException frame out of bounds or channelCount doesn't match

const Frame & Frame::operator= ( const Frame pFrame  )  throw (SynthException)

assignment operator

Parameters:
pFrame frame to copy properties from
Returns:
frame
Exceptions:
SynthException channelCount doesn't match

const Buffer & Frame::operator= ( const Buffer pBuffer  )  throw (SynthException) [virtual]

assignment operator

Parameters:
pBuffer buffer to copy properties from
Returns:
buffer
Exceptions:
SynthException channelCount doesn't match

Reimplemented from iso::synth::Buffer.

sample Frame::operator= ( sample  pValue  )  [virtual]

set content of buffer to one value

Parameters:
pValue value to fill the buffer with

Reimplemented from iso::synth::Buffer.

bool Frame::operator== ( const Frame pFrame  )  const

comparison operator

Parameters:
pFrame frame to which the comparison is made to
Returns:
true, if ChannelCount of both frames are identical, otherwise false

bool Frame::operator== ( const Buffer pBuffer  )  const [virtual]

comparison operator

Parameters:
pBuffer buffer to which the comparison is made to
Returns:
true, if ChannelCount of both buffers are identical, otherwise false

Reimplemented from iso::synth::Buffer.

sample & Frame::operator[] ( unsigned int  pChannelIndex  )  throw (SynthException)

returns sample

Parameters:
pChannelIndex frame index
Returns:
sample
Exceptions:
SynthException frameIndex out of range

const sample & Frame::operator[] ( unsigned int  pChannelIndex  )  const throw (SynthException)

returns sample

Parameters:
pChannelIndex frame index
Returns:
sample
Exceptions:
SynthException frameIndex out of range

const Frame & Frame::operator+= ( sample  pvalue  )  [virtual]

+= operator

Parameters:
pvalue value to be added
Returns:
resulting frame

Reimplemented from iso::synth::Buffer.

const Frame & Frame::operator+= ( const Frame pFrame  )  throw (SynthException)

+= operator

Parameters:
pFrame frame to be added
Returns:
resulting frame
Exceptions:
SynthException frames don't possess same number of channels

const Frame & Frame::operator+= ( const Buffer pBuffer  )  throw (SynthException) [virtual]

+= operator

Parameters:
pBuffer buffer to be added (first frame)
Returns:
resulting frame
Exceptions:
SynthException buffers don't contain same number of channels

Reimplemented from iso::synth::Buffer.

const Frame & Frame::operator *= ( sample  pValue  )  [virtual]

*= operator

Parameters:
pValue value to be multiplied
Returns:
resulting frame

Reimplemented from iso::synth::Buffer.

const Frame & Frame::operator *= ( const Frame pFrame  )  throw (SynthException)

*= operator

Parameters:
pFrame frame to be multiplied
Returns:
resulting frame
Exceptions:
SynthException frames don't possess same number of channels

const Frame & Frame::operator *= ( const Buffer pBuffer  )  throw (SynthException) [virtual]

*= operator

Parameters:
pBuffer buffer to be multiplied (first channel)
Returns:
resulting frame
Exceptions:
SynthException buffers don't contain same number of channels

Reimplemented from iso::synth::Buffer.

void Frame::setSize ( unsigned int  pFrameCount,
unsigned int  pChannelCount 
) throw (SynthException) [virtual]

change buffer size

Parameters:
pFrameCount new frame count
pChannelCount new channel count
Exceptions:
SynthException frame count != 1

Reimplemented from iso::synth::Buffer.

void Frame::setFrameCount ( unsigned int  pFrameCount  )  throw (SynthException) [virtual]

change number of frames

Parameters:
pFrameCount new frameCount
Exceptions:
(SynthException) whenever pFrameCount != 1

Reimplemented from iso::synth::Buffer.

void Frame::appendFrames ( const Buffer pBuffer  )  throw (SynthException) [virtual]

append frames from pBuffer to frame

Parameters:
pBuffer 
Exceptions:
SynthException always! illegal operation for frame

Reimplemented from iso::synth::Buffer.

String Frame::info (  )  const [virtual]

obtain textual frame information

Returns:
String containing frame information

Reimplemented from iso::synth::Buffer.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  pOstream,
const Frame pFrame 
) [friend]

print frame information


Member Data Documentation

const String Frame::sClassName [static]

default name

Reimplemented from iso::synth::Buffer.


The documentation for this class was generated from the following files:
Generated on Fri Feb 25 14:18:41 2011 for synth by  doxygen 1.5.1