Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Outputs a constant DC value. Supports float, int, and fract output types.

Discussion

The DC source module has a constant internal variable holding the data value specified in the arg. ', ...'The DCSourceConst argument.

The module supports float, fract32, or integer output and the pin type is selectable with the outType argument.', . ..' The module continuously fills the output wire with the internal data value. The module supports both single and multichannel interleaved output to a single module output pin.',...

'The output blockSize, sample rate, and number of channels can be specified. If not specified, the values are taken from the system input. ', ...

'Unlike the DCSource module, the output value can only be adjusted during design time, and there is no inspector or optional input pin to control the output value.', ... ' This allows for the user of layout variables to set the output value, which is not possible with the other existing DC Source modules.', ...

'Note that the numbers on canvas/output wire may differ if the argument is out of range for that data type.

Type Definition

Code Blockmarkdown
```
typedef struct _ModuleDCSourceConst
{
ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
INT32 value;                                  // derived Data Value
} ModuleDCSourceConstClass;
 

Variables

Properties

...

Name

...

Type

...

Usage

...

isHidden

...

Default Value

...

Range

...

Units

...

value

...

int

...

derived

...

0

...

2147483647

...

Unrestricted

Pins

Variables

Properties

...

Name

...

Type

...

Usage

...

isHidden

...

Default Value

...

Range

...

Units

...

value

...

int

...

derived

...

0

...

2147483647

...

Unrestricted

Output Pins

Code Block
```

## Variables
### Properties
| Name | Type | Usage | isHidden | Default Value | Range | Units |
| ---- | ---- |---- |---- |---- |---- |---- |
| value | int | derived | 0 | 2147483647 | Unrestricted |  

 

## Pins

### Output Pins 
```
Name: out 
Description: output data 
Data Type: fract32 
```


# Matlab

...

Code Block
 Usage 

```
File Name: dc_source_const_module.m 
 M=dc_source_const_module(NAME, NUMCHANNELS, BLOCKSIZE, SAMPLERATE, VALUE, OUTPUTTYPE) 
 Creates a source module that allows you to inject constant DC test data into 
 the audio processing layout. The output data type can also be set to any of the three supported types (float, fract32, and int) 
 The value is set with the VALUE module argument, and is constant through runtime.  
  
 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. 
    VALUE - the specified constant output value 
    OUTPUTTYPE - the desired output pin type (0=float, 1=fract32, 2=int) 
 
```