|
CSL
6.0
|
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). More...
#include <CSL_Core.h>
Public Member Functions | |
| Port () | |
| Constructors: default is a float = 0. More... | |
| Port (UnitGenerator *ug) | |
| Given a UGen, use it as the input. More... | |
| Port (float value) | |
| given a float, hold it as the static value More... | |
| virtual | ~Port () |
| Destructor. More... | |
| void | checkBuffer () throw (LogicError) |
| check the port's buffer and allocate it if needed More... | |
| float | nextValue () |
| answer the next value (dynamic or constant) More... | |
| void | nextFrame (SampleBuffer where) |
| write the val to a buffer More... | |
| bool | isReady () |
| answer whether I'm ready to be read More... | |
| void | resetPtr () |
| reset the buffer pointer without re-pulling the input More... | |
| virtual bool | isActive () |
| answer whether I'm active More... | |
| void | dump () |
| pretty-print the receiver More... | |
| bool | isFixed () |
| virtual void | trigger () |
| am I fixed or dynamic More... | |
Public Attributes | |
| UnitGenerator * | mUGen |
| my unit generator (pointer or NULL) More... | |
| Buffer * | mBuffer |
| the buffer used to hold my output More... | |
| float | mValue |
| my value (in case I'm fixed [mUGen == NULL]) More... | |
| float * | mValuePtr |
| my value's address (const or buffer pointer) More... | |
| unsigned | mPtrIncrement |
| the inter-sample ptr increment (0 for const, 1 for dynamic) More... | |
| unsigned | mValueIndex |
| my index (into the UGen's buffer) More... | |
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.
Definition at line 312 of file CSL_Core.h.
| Port::Port | ( | ) |
Constructors: default is a float = 0.
Definition at line 766 of file CSL_Core.cpp.
| Port::Port | ( | UnitGenerator * | ug | ) |
Given a UGen, use it as the input.
Definition at line 773 of file CSL_Core.cpp.
References csl::Buffer::allocateBuffers(), csl::Buffer::buffer(), mBuffer, and mValuePtr.
| Port::Port | ( | float | value | ) |
given a float, hold it as the static value
Definition at line 782 of file CSL_Core.cpp.
|
virtual |
Destructor.
Definition at line 789 of file CSL_Core.cpp.
| void Port::checkBuffer | ( | ) | ||
| throw | ( | LogicError | ||
| ) | ||||
check the port's buffer and allocate it if needed
Definition at line 796 of file CSL_Core.cpp.
References csl::Buffer::allocateBuffers(), csl::CGestalt::blockSize(), csl::Buffer::freeBuffers(), mBuffer, csl::Buffer::mNumChannels, csl::Buffer::mNumFrames, mUGen, csl::UnitGenerator::numChannels(), and csl::Buffer::setSize().
|
inline |
answer the next value (dynamic or constant)
Definition at line 341 of file CSL_Core.h.
References mPtrIncrement, and mValuePtr.
Referenced by csl::VSTIO::getParameter(), csl::Panner::nextBuffer(), and csl::NtoMPanner::nextBuffer().
|
inline |
write the val to a buffer
Definition at line 348 of file CSL_Core.h.
References csl::Buffer::buffer(), mBuffer, csl::Buffer::mNumChannels, and mValueIndex.
|
inline |
answer whether I'm ready to be read
Definition at line 356 of file CSL_Core.h.
References mValuePtr.
| void Port::resetPtr | ( | ) |
reset the buffer pointer without re-pulling the input
Definition at line 811 of file CSL_Core.cpp.
References csl::Buffer::buffer(), mBuffer, mPtrIncrement, and mValuePtr.
|
virtual |
answer whether I'm active
Definition at line 818 of file CSL_Core.cpp.
References csl::UnitGenerator::isActive(), and mUGen.
Referenced by csl::Effect::isActive().
| void Port::dump | ( | void | ) |
pretty-print the receiver
Definition at line 827 of file CSL_Core.cpp.
References csl::UnitGenerator::dump(), csl::logMsg(), mPtrIncrement, mUGen, and mValue.
Referenced by csl::BinaryOp::dump().
|
inline |
Definition at line 334 of file CSL_Core.h.
|
inlinevirtual |
am I fixed or dynamic
Definition at line 335 of file CSL_Core.h.
References csl::UnitGenerator::trigger().
| UnitGenerator* csl::Port::mUGen |
my unit generator (pointer or NULL)
Definition at line 320 of file CSL_Core.h.
Referenced by checkBuffer(), dump(), csl::AmbisonicEncoder::input(), isActive(), csl::DistanceSimulator::nextBuffer(), csl::SpatialSource::nextBuffer(), csl::AmbisonicEncoder::setInput(), csl::BinaryOp::setOperand(), csl::AmbisonicDecoder::~AmbisonicDecoder(), and csl::AmbisonicRotator::~AmbisonicRotator().
| Buffer* csl::Port::mBuffer |
the buffer used to hold my output
Definition at line 321 of file CSL_Core.h.
Referenced by checkBuffer(), csl::InOut::nextBuffer(), nextFrame(), Port(), csl::Effect::pullInput(), and resetPtr().
| float csl::Port::mValue |
my value (in case I'm fixed [mUGen == NULL])
Definition at line 322 of file CSL_Core.h.
Referenced by csl::Controllable::addInput(), dump(), and csl::BinaryOp::setOperand().
| float* csl::Port::mValuePtr |
my value's address (const or buffer pointer)
Definition at line 323 of file CSL_Core.h.
Referenced by isReady(), nextValue(), Port(), and resetPtr().
| unsigned csl::Port::mPtrIncrement |
the inter-sample ptr increment (0 for const, 1 for dynamic)
Definition at line 324 of file CSL_Core.h.
Referenced by dump(), nextValue(), and resetPtr().
| unsigned csl::Port::mValueIndex |
my index (into the UGen's buffer)
Definition at line 325 of file CSL_Core.h.
Referenced by nextFrame().