|
CSL
5.2
|
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. More...
#include <CSL_Core.h>
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) |
| write the val to a buffer | |
| bool | isReady () |
| answer whether I'm ready to be read | |
| 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 () |
| virtual void | trigger () |
| am I fixed or dynamic | |
Public Attributes | |
| UnitGenerator * | mUGen |
| my unit generator (pointer or NULL) | |
| Buffer * | mBuffer |
| 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) | |
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 287 of file CSL_Core.h.
| Port::Port | ( | ) |
Constructors: default is a float = 0.
Definition at line 614 of file CSL_Core.cpp.
| Port::Port | ( | UnitGenerator * | ug | ) |
Given a UGen, use it as the input.
Definition at line 621 of file CSL_Core.cpp.
References csl::Buffer::allocateBuffers(), mBuffer, csl::Buffer::monoBuffer(), and mValuePtr.
| Port::Port | ( | float | value | ) |
given a float, hold it as the static value
Definition at line 630 of file CSL_Core.cpp.
|
virtual |
Destructor.
Definition at line 637 of file CSL_Core.cpp.
| void Port::checkBuffer | ( | ) | throw (LogicError) |
check the port's buffer and allocate it if needed
Definition at line 644 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 316 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 323 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 331 of file CSL_Core.h.
References mValuePtr.
| void Port::resetPtr | ( | ) |
reset the buffer pointer without re-pulling the input
Definition at line 659 of file CSL_Core.cpp.
References mBuffer, csl::Buffer::monoBuffer(), mPtrIncrement, and mValuePtr.
|
virtual |
answer whether I'm active
Definition at line 666 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 675 of file CSL_Core.cpp.
References csl::UnitGenerator::dump(), csl::logMsg(), mPtrIncrement, mUGen, and mValue.
Referenced by csl::BinaryOp::dump().
|
inline |
Definition at line 309 of file CSL_Core.h.
References mPtrIncrement.
|
inlinevirtual |
am I fixed or dynamic
Definition at line 310 of file CSL_Core.h.
References mUGen, and csl::UnitGenerator::trigger().
| UnitGenerator* csl::Port::mUGen |
my unit generator (pointer or NULL)
Definition at line 295 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(), trigger(), csl::AmbisonicDecoder::~AmbisonicDecoder(), and csl::AmbisonicRotator::~AmbisonicRotator().
| Buffer* csl::Port::mBuffer |
the buffer used to hold my output
Definition at line 296 of file CSL_Core.h.
Referenced by checkBuffer(), csl::RtpSender::nextBuffer(), 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 297 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 298 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 299 of file CSL_Core.h.
Referenced by dump(), isFixed(), nextValue(), and resetPtr().
| unsigned csl::Port::mValueIndex |
my index (into the UGen's buffer)
Definition at line 300 of file CSL_Core.h.
Referenced by nextFrame().