csl::Port Class Reference

#include <CSL_Core.h>

List of all members.

Public Member Functions

 Port ()
 Constructors: default is a float = 0.
 Port (UnitGenerator *ug)
 Given a UGen, use it as the input.
 Port (float value)
 given a float, hold it as the static value
virtual ~Port ()
 Destructor.
void checkBuffer () throw (LogicError)
 check the port's buffer and allocate it if needed
float nextValue ()
 answer the next value (dynamic or constant)
void nextFrame (SampleBuffer where)
bool isReady ()
void resetPtr ()
 reset the buffer pointer without re-pulling the input
virtual bool isActive ()
 answer whether I'm active
void dump ()
 pretty-print the receiver
bool isFixed ()

Public Attributes

UnitGeneratormUGen
 my unit generator (pointer)
BuffermBuffer
 the buffer used to hold my output
float mValue
 my value (in case I'm fixed [mUGen == NULL])
float * mValuePtr
 my value's address (const or buffer pointer)
unsigned mPtrIncrement
 the inter-sample ptr increment (0 for const, 1 for dynamic)
unsigned mValueIndex
 my index (into the UGen's buffer)


Detailed Description

Port -- used to represent constant, control-rate or signal inputs and outputs in named maps; holds a UnitGenerator and its buffer, OR a single floating-point value (in which case the UGen pointer is set to NULL and mPtrIncrement = 0). The nextValue() message is used to get the dynamic or static value.

Constructor & Destructor Documentation

Port::Port (  ) 

Constructors: default is a float = 0.

Port::Port ( UnitGenerator ug  ) 

Given a UGen, use it as the input.

References csl::Buffer::allocateBuffers(), mBuffer, csl::Buffer::monoBuffer(), and mValuePtr.

Port::Port ( float  value  ) 

given a float, hold it as the static value

Port::~Port (  )  [virtual]

Destructor.


Member Function Documentation

void Port::checkBuffer (  )  throw (LogicError)

sample csl::Port::nextValue (  )  [inline]

answer the next value (dynamic or constant)

References mPtrIncrement, and mValuePtr.

Referenced by csl::NtoMPanner::nextBuffer(), and csl::Panner::nextBuffer().

void csl::Port::nextFrame ( SampleBuffer  where  )  [inline]

bool csl::Port::isReady (  )  [inline]

References mValuePtr.

void Port::resetPtr (  ) 

reset the buffer pointer without re-pulling the input

References mBuffer, csl::Buffer::monoBuffer(), mPtrIncrement, and mValuePtr.

bool Port::isActive (  )  [virtual]

answer whether I'm active

References csl::UnitGenerator::isActive(), and mUGen.

void Port::dump ( void   ) 

pretty-print the receiver

References csl::UnitGenerator::dump(), csl::logMsg(), mPtrIncrement, mUGen, and mValue.

Referenced by csl::BinaryOp::dump().

bool csl::Port::isFixed (  )  [inline]

References mPtrIncrement.


Member Data Documentation

my value (in case I'm fixed [mUGen == NULL])

Referenced by csl::Controllable::addInput(), and dump().

my value's address (const or buffer pointer)

Referenced by isReady(), nextValue(), Port(), and resetPtr().

the inter-sample ptr increment (0 for const, 1 for dynamic)

Referenced by dump(), isFixed(), nextValue(), and resetPtr().

my index (into the UGen's buffer)

Referenced by nextFrame().


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