iso::synth::RingBuffer Class Reference

circular storage class for audio or control data More...

#include <iso_synth_ring_buffer.h>

Inherits iso::synth::Buffer.

Inheritance diagram for iso::synth::RingBuffer:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 RingBuffer (unsigned int pFrameCount, unsigned int pChannelCount)
 parameter based constructor
 RingBuffer (const String &pName, unsigned int pFrameCount, unsigned int pChannelCount)
 parameter based constructor
 RingBuffer (const serialize::SerializeData &pSerializeData) throw (serialize::SerializeException)
 serialization based constructor
 ~RingBuffer ()
 destructor
virtual serialize::SerializeData serialize (const String &pSerialName=sClassName) const
 create serializeData for ring buffer
const Stringname () const
 return name of ring buffer
void write (const Frame *pFrame) throw (SynthException)
 write frame content into ring buffer
void write (const Buffer *pBuffer) throw (SynthException)
 write buffer content into ring buffer
void read (Frame *pFrame, Frame *pRelPos) const throw (SynthException)
 write ring buffer content into frame
void readInterpol (Frame *pFrame, Frame *pRelPos) const throw (SynthException)
 write interpolated ring buffer content into frame
void read (Buffer *pBuffer, Frame *pRelPos) const throw (SynthException)
 write ring buffer content into buffer
void read (Buffer *pBuffer, Frame *pRelPos, Frame *pRate) const throw (SynthException)
 write ring buffer content into buffer
void readInterpol (Buffer *pBuffer, Frame *pRelPos, Frame *pRate) const throw (SynthException)
 write interpolated ring buffer content into buffer
void read (Buffer *pBuffer, Buffer *pRelPos) const throw (SynthException)
 write ring buffer content into buffer
String info () const
 obtain textual ring buffer information

Static Public Member Functions

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

Static Public Attributes

static const String sClassName
 default name

Protected Member Functions

 RingBuffer ()
 default constructor

Protected Attributes

String mName
 ring buffer name
unsigned int mFrontPos
 current insertion position within ringbuffer

Static Protected Attributes

static unsigned int sCount
 total number of ring buffers

Friends

std::ostream & operator<< (std::ostream &pOstream, const RingBuffer &pRingBuffer)
 print ring buffer information

Detailed Description

circular storage class for audio or control data

for signal data

Created by Daniel Bisig on 08/15/06.


Constructor & Destructor Documentation

RingBuffer::RingBuffer ( unsigned int  pFrameCount,
unsigned int  pChannelCount 
)

parameter based constructor

Parameters:
pFrameCount number of frames
pChannelCount number of channels

RingBuffer::RingBuffer ( const String pName,
unsigned int  pFrameCount,
unsigned int  pChannelCount 
)

parameter based constructor

Parameters:
pName name of ring buffer
pFrameCount number of frames
pChannelCount number of channels

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

serialization based constructor

Parameters:
pSerializeData serialization data
Exceptions:
SerializeException failed to create ring buffer

RingBuffer::~RingBuffer (  ) 

destructor

RingBuffer::RingBuffer (  )  [protected]

default constructor


Member Function Documentation

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

create serializeData for ring buffer

Returns:
serializeData

Reimplemented from iso::synth::Buffer.

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

create ring buffer from SerializeData

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

Reimplemented from iso::synth::Buffer.

const String & RingBuffer::name (  )  const

return name of ring buffer

Returns:
name of ring buffer

void RingBuffer::write ( const Frame pFrame  )  throw (SynthException)

write frame content into ring buffer

Parameters:
pFrame frame to write into ring buffer
Exceptions:
SynthException incompatible channelCount
ring buffer start position is updated after each write command

void RingBuffer::write ( const Buffer pBuffer  )  throw (SynthException)

write buffer content into ring buffer

Parameters:
pBuffer buffer to write into ring buffer
Exceptions:
SynthException incompatible channelCount
ring buffer start position is updated after each write command

void RingBuffer::read ( Frame pFrame,
Frame pRelPos 
) const throw (SynthException)

write ring buffer content into frame

Parameters:
pFrame frame to fill ring buffer content in
pRelPos position to read from (relative to front position)
Exceptions:
SynthException incompatible channelCount

void RingBuffer::readInterpol ( Frame pFrame,
Frame pRelPos 
) const throw (SynthException)

write interpolated ring buffer content into frame

Parameters:
pFrame frame to fill ring buffer content in
pRelPos position to read from (relative to front position)
Exceptions:
SynthException incompatible channelCount

void RingBuffer::read ( Buffer pBuffer,
Frame pRelPos 
) const throw (SynthException)

write ring buffer content into buffer

Parameters:
pBuffer buffer to fill ring buffer content in
pRelPos position to read from (relative to front position)
Exceptions:
SynthException incompatible channelCount

void RingBuffer::read ( Buffer pBuffer,
Frame pRelPos,
Frame pRate 
) const throw (SynthException)

write ring buffer content into buffer

Parameters:
pBuffer buffer to fill ring buffer content in
pRelPos position to read from (relative to front position)
pRate read rate
Exceptions:
SynthException incompatible channelCount

void RingBuffer::readInterpol ( Buffer pBuffer,
Frame pRelPos,
Frame pRate 
) const throw (SynthException)

write interpolated ring buffer content into buffer

Parameters:
pBuffer buffer to fill ring buffer content in
pRelPos position to read from (relative to front position)
pRate read rate
Exceptions:
SynthException incompatible channelCount

void RingBuffer::read ( Buffer pBuffer,
Buffer pRelPos 
) const throw (SynthException)

write ring buffer content into buffer

Parameters:
pBuffer buffer to fill ring buffer content in
pRelPos position to read from (relative to front position)
Exceptions:
SynthException incompatible channelCount

String RingBuffer::info (  )  const [virtual]

obtain textual ring buffer information

Returns:
String containing ring buffer information

Reimplemented from iso::synth::Buffer.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  pOstream,
const RingBuffer pRingBuffer 
) [friend]

print ring buffer information


Member Data Documentation

const String RingBuffer::sClassName [static]

default name

Reimplemented from iso::synth::Buffer.

unsigned int RingBuffer::sCount [static, protected]

total number of ring buffers

String iso::synth::RingBuffer::mName [protected]

ring buffer name

unsigned int iso::synth::RingBuffer::mFrontPos [protected]

current insertion position within ringbuffer


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