csl::BufferStream Class Reference

#include <RingBuffer.h>

Inheritance diagram for csl::BufferStream:

csl::UnitGenerator csl::Seekable csl::Writeable csl::Model

List of all members.

Public Member Functions

 BufferStream (Buffer &buffer)
void nextBuffer (Buffer &outputBuffer) throw (CException)
 Read a buffer from the buffer stream.
void writeBuffer (Buffer &inputBuffer) throw (CException)
 Write a buffer of data into the ring buffer.
void nextBuffer (Buffer &outputBuffer, unsigned outBufNum) throw (CException)
void writeBuffer (Buffer &inputBuffer, unsigned bufNum) throw (CException)
 write to the receiver
void setBuffer (Buffer &buffer)
unsigned seekTo (int position, SeekPosition whence) throw (CException)
 general-purpose seek on a stream
unsigned duration () const
 number of frames in the Seekable

Protected Attributes

BuffermBuffer
unsigned mCurrentWriteFrame
unsigned mTempCurrentFrame
 a little hack necessary to track info
unsigned mTempCurrentWriteFrame
 a little hack necessary to track info


Detailed Description

Class to simplify writing into and playing back buffers. Think of this as a simple buffer that has a seek, read and write calls built-in.

Constructor & Destructor Documentation

csl::BufferStream::BufferStream ( Buffer buffer  )  [inline]


Member Function Documentation

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

Read a buffer from the buffer stream.

Reimplemented from csl::UnitGenerator.

References csl::UnitGenerator::nextBuffer().

void BufferStream::writeBuffer ( Buffer inputBuffer  )  throw (CException) [virtual]

Write a buffer of data into the ring buffer.

Reimplemented from csl::Writeable.

References csl::Writeable::writeBuffer().

void BufferStream::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 BufferStream::writeBuffer ( Buffer inputBuffer,
unsigned  bufNum 
) throw (CException) [virtual]

write to the receiver

Reimplemented from csl::Writeable.

References csl::kLogError, and csl::logMsg().

void csl::BufferStream::setBuffer ( Buffer buffer  )  [inline]

References mBuffer.

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

general-purpose seek on a stream

Implements csl::Seekable.

References csl::kPositionCurrent, csl::kPositionEnd, and csl::kPositionStart.

unsigned BufferStream::duration (  )  const [virtual]

number of frames in the Seekable

Implements csl::Seekable.

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


Member Data Documentation

Referenced by duration(), and setBuffer().

a little hack necessary to track info

a little hack necessary to track info


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