31 for (
int i = 0; i < num_inputs; ++i) {
52 bool enable_processors = (source != 0);
54 processor->enable(enable_processors);
Processor(int num_inputs, int num_outputs, bool control_rate=false, int max_oversample=1)
Constructs a Processor with a given number of inputs/outputs and oversampling.
Definition processor.cpp:25
force_inline int numOutputs() const
Returns the total number of Output pointers (owned or otherwise).
Definition processor.h:564
force_inline int numInputs() const
Returns the total number of Input pointers (owned or otherwise).
Definition processor.h:557
virtual void setOversampleAmount(int oversample)
Sets the oversampling amount and updates the effective sample rate.
Definition processor.h:293
force_inline Input * input(unsigned int index=0) const
Retrieves the Input pointer at a given index.
Definition processor.h:587
Output * addOutput(int oversample=1)
Creates and registers a new Output. Handles control rate vs. audio rate.
Definition processor.cpp:231
force_inline Output * output(unsigned int index=0) const
Retrieves the Output pointer at a given index.
Definition processor.h:616
virtual void enable(bool enable)
Enables or disables this Processor.
Definition processor.h:318
A Processor that maintains and outputs a constant poly_float value.
Definition value.h:24
virtual void set(poly_float value)
Sets the internal value to a new poly_float.
Definition value.cpp:17
poly_float value_
The constant output value.
Definition value.h:69
force_inline mono_float value() const
Returns the current mono_float value of the first lane.
Definition value.h:60
ValueSwitch(mono_float value=0.0f)
Constructs a new ValueSwitch with an initial value.
Definition value_switch.cpp:11
@ kNumOutputs
Definition value_switch.h:37
@ kSwitch
The selected input signal output.
Definition value_switch.h:36
virtual void setOversampleAmount(int oversample) override
Sets the oversampling amount for this ValueSwitch and all connected sources.
Definition value_switch.cpp:27
virtual void set(poly_float value) override
Sets the control value, selecting the corresponding input as the output.
Definition value_switch.cpp:21
#define force_inline
Definition common.h:23
force_inline int iclamp(int value, int min_val, int max_val)
Clamps an integer between [min_val, max_val].
Definition utils.h:250
Contains classes and functions used within the Vital synthesizer framework.
float mono_float
Definition common.h:33
poly_float * buffer
Pointer to the output buffer.
Definition processor.h:110
Processor * owner
Owning processor.
Definition processor.h:112
int buffer_size
Current buffer size in samples.
Definition processor.h:114
Represents a vector of floating-point values using SIMD instructions.
Definition poly_values.h:600
Provides various utility functions, classes, and constants for audio, math, and general-purpose opera...
Declares the ValueSwitch class, which allows switching the output buffer based on a control value.