csl::RingBufferTap Class Reference

#include <RingBuffer.h>

Inheritance diagram for csl::RingBufferTap:

csl::UnitGenerator csl::Scalable csl::Seekable csl::Model csl::Controllable

List of all members.

Public Member Functions

 RingBufferTap (RingBuffer *parent=0, int offset=0)
void setOffset (int offset)
unsigned duration () const
 number of frames in the Seekable
unsigned seekTo (int position, SeekPosition whence) throw (CException)
 general-purpose seek on a stream
void setLoopStart (unsigned frame)
void setLoopEnd (unsigned frame)
void setBuffer (RingBuffer *parent)
void nextBuffer (Buffer &outputBuffer) throw (CException)
 nextBuffer method
void nextBuffer (Buffer &outputBuffer, unsigned outBufNum) throw (CException)
void destructiveNextBuffer (Buffer &outputBuffer) throw (CException)
 zeroing as it goes.
void destructiveNextBuffer (Buffer &outputBuffer, unsigned outBufNum) throw (CException)

Public Attributes

unsigned mLoopStartFrame
 Number of frames from the beginning to start a loop at.
unsigned mLoopEndFrame
 Number of frames away from buffer end.

Protected Attributes

unsigned mTempCurrentFrame
RingBuffermParentBuffer

Friends

class RingBuffer
 Allow RingBuffer to access private members of RingBufferTap.


Detailed Description

RingBufferTap is a reader that loops over a buffer

Constructor & Destructor Documentation

RingBufferTap::RingBufferTap ( RingBuffer parent = 0,
int  offset = 0 
)

Create a tap on a ring buffer, optionally offset relative to the current write position.

References setOffset().


Member Function Documentation

void RingBufferTap::setOffset ( int  offset  ) 

unsigned RingBufferTap::duration (  )  const [virtual]

number of frames in the Seekable

Implements csl::Seekable.

References csl::RingBuffer::mBuffer, csl::Buffer::mNumFrames, and mParentBuffer.

unsigned RingBufferTap::seekTo ( int  position,
SeekPosition  whence 
) throw (CException) [virtual]

void csl::RingBufferTap::setLoopStart ( unsigned  frame  )  [inline]

void csl::RingBufferTap::setLoopEnd ( unsigned  frame  )  [inline]

References mLoopEndFrame.

Referenced by csl::RingBuffer::setLoopEnd().

void csl::RingBufferTap::setBuffer ( RingBuffer parent  )  [inline]

References mParentBuffer.

Referenced by csl::RingBuffer::RingBuffer().

void RingBufferTap::nextBuffer ( Buffer outputBuffer  )  throw (CException) [virtual]

nextBuffer method

Reimplemented from csl::UnitGenerator.

References csl::UnitGenerator::nextBuffer().

void RingBufferTap::nextBuffer ( Buffer outputBuffer,
unsigned  outBufNum 
) throw (CException) [virtual]

really compute the next buffer given an offset base channel; this is called by nextBuffer, possibly multiple times

Reimplemented from csl::UnitGenerator.

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

zeroing as it goes.

void RingBufferTap::destructiveNextBuffer ( Buffer outputBuffer,
unsigned  outBufNum 
) throw (CException)


Friends And Related Function Documentation

friend class RingBuffer [friend]

Allow RingBuffer to access private members of RingBufferTap.


Member Data Documentation

Number of frames from the beginning to start a loop at.

Referenced by setLoopStart().

Number of frames away from buffer end.

Referenced by setLoopEnd().

Referenced by duration(), setBuffer(), and setOffset().


The documentation for this class was generated from the following files:

Generated on Thu Sep 17 23:14:17 2009 for CSL by  doxygen 1.5.8