MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ process_batch()

std::vector< double > MayaFlux::Nodes::Constant::process_batch ( unsigned int  num_samples)
overridevirtual

Fill a buffer with the constant value.

Parameters
num_samplesNumber of samples to generate
Returns
Vector of num_samples copies of the constant

Each element is produced via process_sample(0.0) so that per-sample callbacks fire correctly for every position in the batch.

Implements MayaFlux::Nodes::Node.

Definition at line 26 of file Constant.cpp.

27{
28 std::vector<double> out(num_samples);
29 for (unsigned int i = 0; i < num_samples; ++i) {
30 out[i] = process_sample(0.0);
31 }
32 return out;
33}
double process_sample(double input=0.0) override
Return the constant value, ignoring input.
Definition Constant.cpp:15

References process_sample().

+ Here is the call graph for this function: