![]() |
VISR
0.12.0
Versatile Interactive Scene Renderer
|
#include <signal_routing.hpp>
Public Member Functions | |
SignalRouting (SignalFlowContext const &context, char const *name, CompositeComponent *parent=nullptr) | |
~SignalRouting () | |
void | setup (std::size_t inputWidth, std::size_t outputWidth, bool controlPort=false) |
void | setup (std::size_t inputWidth, std::size_t outputWidth, pml::SignalRoutingParameter const &initialRouting, bool controlPort=false) |
void | process () |
void | setRouting (pml::SignalRoutingParameter const &newRouting) |
void | setRouting (pml::SignalRoutingParameter::IndexType in, pml::SignalRoutingParameter::IndexType out) |
bool | removeRouting (pml::SignalRoutingParameter::IndexType in, pml::SignalRoutingParameter::IndexType out) |
![]() | |
AtomicComponent (SignalFlowContext const &context, char const *name, CompositeComponent *parent=nullptr) | |
AtomicComponent (AtomicComponent const &)=delete | |
AtomicComponent (AtomicComponent &&)=delete | |
virtual | ~AtomicComponent () override |
![]() | |
Component (SignalFlowContext const &context, char const *componentName, CompositeComponent *parent) | |
Component (SignalFlowContext const &context, std::string const &componentName, CompositeComponent *parent) | |
Component (Component const &)=delete | |
Component (Component &&)=delete | |
Component & | operator= (Component const &)=delete |
Component & | operator= (Component &&)=delete |
virtual | ~Component () |
std::string const & | name () const |
std::string | fullName () const |
void | status (StatusMessage::Kind status, char const *message) |
template<typename... MessageArgs> | |
void | status (StatusMessage::Kind status, MessageArgs...args) |
bool | isComposite () const |
AudioPortBase & | audioPort (char const *portName) |
AudioPortBase const & | audioPort (char const *portName) const |
AudioPortBase & | audioPort (std::string const &portName) |
AudioPortBase const & | audioPort (std::string const &portName) const |
ParameterPortBase & | parameterPort (char const *portName) |
ParameterPortBase const & | parameterPort (char const *portName) const |
ParameterPortBase & | parameterPort (std::string const &portName) |
ParameterPortBase const & | parameterPort (std::string const &portName) const |
SamplingFrequencyType | samplingFrequency () const |
std::size_t | period () const |
bool | isTopLevel () const |
impl::ComponentImplementation & | implementation () |
impl::ComponentImplementation const & | implementation () const |
Additional Inherited Members | |
![]() | |
static const std::string & | nameSeparator () |
![]() | |
Component (impl::ComponentImplementation *impl) | |
Audio component for performing arbitrary routings between the channels of the input and the output port. The number of channels of the input and output port are set by the inputWidth
and outputWidth
arguments passed to the setup() method, respectively.
|
explicit |
Constructor.
context | Configuration object containing basic execution parameters. |
name | The name of the component. Must be unique within the containing composite component (if there is one). |
parent | Pointer to a containing component if there is one. Specify nullptr in case of a top-level component. |
visr::rcl::SignalRouting::~SignalRouting | ( | ) |
Destructor.
|
virtual |
The process function. For each routing connection set within the component, it copies the audio signal from the input channel references by the routing to the corresponding output channel of this routing. The number of samples processed in each call is determined by the period of the containing audio signal flow.
Implements visr::AtomicComponent.
bool visr::rcl::SignalRouting::removeRouting | ( | pml::SignalRoutingParameter::IndexType | in, |
pml::SignalRoutingParameter::IndexType | out | ||
) |
Remove a specific routing connection. If the specified routing does not exist, no operation is performed.
in | The input channel index of the routing to be removed |
out | The output channel index of the routing to be removed |
void visr::rcl::SignalRouting::setRouting | ( | pml::SignalRoutingParameter const & | newRouting | ) |
Reset the routing information for this component completely. This removes all existing routings.
newRouting | The set of new routing connections. |
void visr::rcl::SignalRouting::setRouting | ( | pml::SignalRoutingParameter::IndexType | in, |
pml::SignalRoutingParameter::IndexType | out | ||
) |
Set a specific routing between an input and output channel. If the routing already exists, no operation is performed. If the output channel references by out
is already connected to a different input, this previous routing is removed.
in | The channel index of the input port from where the signal is routed |
out | The channel index of the output port to where the signal is routed |
void visr::rcl::SignalRouting::setup | ( | std::size_t | inputWidth, |
std::size_t | outputWidth, | ||
bool | controlPort = false |
||
) |
Method to initialise the component.
inputWidth | The width of the input vector, i.e., the number of single signals in this port. |
outputWidth | The number of signals channels in the output port. |
controlPort | Whether the component creates a parameter input port (message type: pml::SignalRoutingParameter, protocol: pml::DoubleBufferingProtocol ). Default: false |
void visr::rcl::SignalRouting::setup | ( | std::size_t | inputWidth, |
std::size_t | outputWidth, | ||
pml::SignalRoutingParameter const & | initialRouting, | ||
bool | controlPort = false |
||
) |
Method to initialise the component.
inputWidth | The width of the input vector, i.e., the number of single signals in this port. |
outputWidth | The number of signals channels in the output port. |
initialRouting | The initial routing connections |
controlPort | Whether the component creates a parameter input port (message type: pml::SignalRoutingParameter, protocol: pml::DoubleBufferingProtocol ). Default: false |