DCSourceV2
Overview
Outputs a constant DC value with optional input control pin to scale DC value.
Discussion
The DC source module has an internal variable holding one data value. The module continuously fills the output wire with the internal data value. This module also has optional input control pin to scale the internal data value. The output blockSize and sample rate can be specified. If not specified, the values are taken from the system input.
Type Definition
typedef struct _ModuleDCSourceV2
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
FLOAT32 value; // Data Value
} ModuleDCSourceV2Class;
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
value | float | parameter | 0 | 1 | -20:20 |
Pins
Output Pins
Name: control
Description: Input control signal
Data type: float
Channel range: Unrestricted
Block size range: Unrestricted
Sample rate range: Unrestricted
Complex support: Real
Output Pins
Name: out
Description: output data
Data type: float
MATLAB Usage
File Name: dc_source_v2_module.m
M=dc_source_v2_module(NAME, NUMCHANNELS, BLOCKSIZE, SAMPLERATE, CONTROLPIN)
Creates a source module that allows you to inject DC test data into
the audio processing layout. Also has optional input control pin to scale
the data value to be written on ooutput pin.
Arguments:
NAME - name of the module.
NUMCHANNELS - number of interleaved channels in each output pin.
BLOCKSIZE - number of samples per output channel.
SAMPLERATE - sample rate of the output signal, in Hz.
CONTROLPIN - boolean to add control input pin or not.