csl::RingBuffer Class Reference

#include <RingBuffer.h>

Inheritance diagram for csl::RingBuffer:

csl::UnitGenerator csl::Scalable csl::Writeable List of all members.

Detailed Description

RingBuffer is the storage + a default reader


Public Member Functions

 RingBuffer ()
 RingBuffer (unsigned int numChannels, unsigned int numFrames)
unsigned seekTo (int position) throw (CException)
void setLoopStart (unsigned frame)
void setLoopEnd (unsigned frame)
 Calls the setLoopStart of it's tap.
void nextBuffer (Buffer &outputBuffer) throw (CException)
 Calls the setLoopEnd of it's tap. Read a buffer from the ring buffer.
void writeBuffer (Buffer &inputBuffer) throw (CException)
 Write a buffer of data into the ring buffer.
void sumIntoBuffer (Buffer &inputBuffer) throw (CException)
 Do an adding write of data into the ring buffer.
void destructiveNextBuffer (Buffer &outputBuffer) throw (CException)
 Read a buffer zeroing as you go.
void writeBuffer (Buffer &inputBuffer, unsigned bufNum) throw (CException)
void sumIntoBuffer (Buffer &inputBuffer, unsigned bufNum) throw (CException)

Public Attributes

unsigned mCurrentWriteFrame
 state -- users can manipulate my internal tap and buffer
Buffer mBuffer
RingBufferTap mTap
 internal tap so a RingBuffer can also be a a UnitGenerator

Protected Attributes

unsigned mTempCurrentWriteFrame
 Used in next buffer to save state between calls in the same block.

Friends

class RingBufferTap
 Allow the RingBufferTap to access private members of this class.


Constructor & Destructor Documentation

csl::RingBuffer::RingBuffer  )  [inline]
 

csl::RingBuffer::RingBuffer unsigned int  numChannels,
unsigned int  numFrames
[inline]
 


Member Function Documentation

unsigned RingBuffer::seekTo int  position  )  throw (CException)
 

void csl::RingBuffer::setLoopStart unsigned  frame  )  [inline]
 

These loop setters allow for variable buffer lengths by varying the points where the buffer writes.

void csl::RingBuffer::setLoopEnd unsigned  frame  )  [inline]
 

Calls the setLoopStart of it's tap.

void RingBuffer::nextBuffer Buffer outputBuffer  )  throw (CException)
 

Calls the setLoopEnd of it's tap. Read a buffer from the ring buffer.

Various flavours of next buffer. Also the nextBuffer(Buffer &) has to be implemented to be able to hold state of the currentWriteFrame. Otherwise every time it's called by the super nextBuffer the currentWriteFrame would be incremented more and more, leading to erroneous results.

void RingBuffer::writeBuffer Buffer inputBuffer  )  throw (CException)
 

Write a buffer of data into the ring buffer.

void RingBuffer::sumIntoBuffer Buffer inputBuffer  )  throw (CException)
 

Do an adding write of data into the ring buffer.

void RingBuffer::destructiveNextBuffer Buffer outputBuffer  )  throw (CException)
 

Read a buffer zeroing as you go.

void RingBuffer::writeBuffer Buffer inputBuffer,
unsigned  bufNum
throw (CException)
 

void RingBuffer::sumIntoBuffer Buffer inputBuffer,
unsigned  bufNum
throw (CException)
 


Friends And Related Function Documentation

friend class RingBufferTap [friend]
 

Allow the RingBufferTap to access private members of this class.


Member Data Documentation

unsigned csl::RingBuffer::mCurrentWriteFrame
 

state -- users can manipulate my internal tap and buffer

Buffer csl::RingBuffer::mBuffer
 

RingBufferTap csl::RingBuffer::mTap
 

internal tap so a RingBuffer can also be a a UnitGenerator

unsigned csl::RingBuffer::mTempCurrentWriteFrame [protected]
 

Used in next buffer to save state between calls in the same block.


The documentation for this class was generated from the following files:
Generated on Fri Apr 6 20:18:19 2007 for CSL by  doxygen 1.4.5-20051010