iso::synth::Sample Class Reference

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

#include <iso_synth_sample.h>

Inherits iso::synth::Buffer.

Inheritance diagram for iso::synth::Sample:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Sample ()
 default contructor
 Sample (sample pValue)
 paramater based contructor
 Sample (const Sample &pSample)
 copy constructor
 Sample (const Buffer &pBuffer, unsigned int pFrameIndex=0, unsigned int pChannelIndex=0) throw (SynthException)
 copy constructor
 Sample (const serialize::SerializeData &pSerializeData) throw (serialize::SerializeException)
 serialization based constructor
 ~Sample ()
 destructor
virtual serialize::SerializeData serialize (const String &pSerialName=sClassName) const
 create serializeData for sample
const Sampleoperator= (const Sample &pSample)
 assignment operator
const Bufferoperator= (const Buffer &pBuffer) throw (SynthException)
 assignment operator
const Sampleoperator+= (const Sample &pSample)
 += operator
const Sampleoperator+= (const Buffer &pBuffer) throw (SynthException)
 += operator
const Sampleoperator *= (const Sample &pSample)
 *= operator
const Sampleoperator *= (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
virtual void setChannelCount (unsigned int pChannelCount) throw (SynthException)
 change number of channels
void appendFrames (const Buffer &pBuffer) throw (SynthException)
 append frames from pBuffer to sample
void appendChannels (const Buffer &pBuffer) throw (SynthException)
 append channels from pBuffer to sample
String info () const
 obtain textual sample information

Static Public Member Functions

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

Static Public Attributes

static const String sClassName
 default name

Friends

std::ostream & operator<< (std::ostream &pOstream, const Sample &pSample)
 print sample information

Detailed Description

storage for audio data that contains one frame and one channel of samples

audio data that contains one frame and one channel of samples

Created by Daniel Bisig on 06/18/06.


Constructor & Destructor Documentation

Sample::Sample (  ) 

default contructor

Sample::Sample ( sample  pValue  ) 

paramater based contructor

Parameters:
pValue value to set sample value to

Sample::Sample ( const Sample pSample  ) 

copy constructor

Parameters:
pSample sample to copy properties from

Sample::Sample ( const Buffer pBuffer,
unsigned int  pFrameIndex = 0,
unsigned int  pChannelIndex = 0 
) throw (SynthException)

copy constructor

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

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

serialization based constructor

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

Sample::~Sample (  ) 

destructor


Member Function Documentation

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

create serializeData for sample

Returns:
serializeData

Reimplemented from iso::synth::Buffer.

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

create sample from SerializeData

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

Reimplemented from iso::synth::Buffer.

const Sample & Sample::operator= ( const Sample pSample  ) 

assignment operator

Parameters:
pSample sample to copy properties from
Returns:
sample

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

assignment operator

Parameters:
pBuffer buffer to copy properties from (first frame, first channel)
Returns:
buffer
Exceptions:
SynthException never

Reimplemented from iso::synth::Buffer.

const Sample & Sample::operator+= ( const Sample pSample  ) 

+= operator

Parameters:
pSample sample to be added
Returns:
resulting sample

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

+= operator

Parameters:
pBuffer buffer to be added (first frame, first channel)
Returns:
resulting sample
Exceptions:
SynthException never

Reimplemented from iso::synth::Buffer.

const Sample & Sample::operator *= ( const Sample pSample  ) 

*= operator

Parameters:
pSample sample to be multiplied
Returns:
resulting sample

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

*= operator

Parameters:
pBuffer buffer to be multiplied (first frame, first channel)
Returns:
resulting sample
Exceptions:
SynthException never

Reimplemented from iso::synth::Buffer.

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

change buffer size

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

Reimplemented from iso::synth::Buffer.

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

change number of frames

Parameters:
pFrameCount new frameCount
Exceptions:
SynthException if frame count != 1

Reimplemented from iso::synth::Buffer.

void Sample::setChannelCount ( unsigned int  pChannelCount  )  throw (SynthException) [virtual]

change number of channels

Parameters:
pChannelCount new channelCount
Exceptions:
SynthException if channel count != 1

Reimplemented from iso::synth::Buffer.

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

append frames from pBuffer to sample

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

Reimplemented from iso::synth::Buffer.

void Sample::appendChannels ( const Buffer pBuffer  )  throw (SynthException) [virtual]

append channels from pBuffer to sample

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

Reimplemented from iso::synth::Buffer.

String Sample::info (  )  const [virtual]

obtain textual sample information

Returns:
String containing sample information

Reimplemented from iso::synth::Buffer.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  pOstream,
const Sample pSample 
) [friend]

print sample information


Member Data Documentation

const String Sample::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:42 2011 for synth by  doxygen 1.5.1