Skip to content

DCSourceFract16

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.

Module Pack

Standard

ClassID

classID = 252

Type Definition

typedef struct _ModuleDCSourceFract16
{
ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
FLOAT32 value;                                // Data Value
fract16Var valuefract16;                      // Data Value
} ModuleDCSourceFract16Class;

Variables

Properties

Name Type Usage isHidden Default Value Range Units
value float parameter 0 0.99 -1:0.999984741211
valuefract16 fract16 derived 0 0.98999 Unrestricted

Pins

Input Pins

Name control
Description Input control signal
Data type fract16
Channel range Unrestricted
Block size range Unrestricted
Sample rate range Unrestricted
Complex support Real

Output Pins

Name out
Description output data
Data Type fract16

Matlab Usage

File Name: dc_source_fract16_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. 

Copyright (c) 2026 DSP Concepts, Inc.