Alignment Delay
Overview
Module that aligns the accumulated output delay at all output pins
Discussion
This subsystem module aligns all of the input pins so that all of the outputs have the same accumulated delay. It relies on the value of the accumulated delay wire property for each of the input pins to determine the delay that needs to be applied for each input channel of each input pin. Audio signals of input pins must be a real number in time domain.
If outputDelayMs argument is blank, the module aligns the output delay to the maximum accumulated delay over all input pins. If outputDelayMs argument has a value, the module aligns the output delay to the specified delay value. The module will show an error message if outputDelayMs value is smaller than the maximum accumulated delay over all input pins.
Module Pack
Advanced
ClassID
classID =
Type Definition
typedef struct _ModuleAlignmentDelay
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
} ModuleAlignmentDelayClass;
Variables
Properties
| Name | Type | Usage | isHidden | Default Value | Range | Units |
|---|---|---|---|---|---|---|
| outputDelay | float | derived | 1 | 0 | Unrestricted |
Pins
Input Pins
| Name | in1 |
| Description | Audio Input |
| Data type | {float, int, fract32} |
| Channel range | Unrestricted |
| Block size range | Unrestricted |
| Sample rate range | Unrestricted |
| Complex support | Real |
| Name | in2 |
| Description | Audio Input |
| Data type | {float, int, fract32} |
| Channel range | Unrestricted |
| Block size range | Unrestricted |
| Sample rate range | Unrestricted |
| Complex support | Real |
Output Pins
| Name | out1 |
| Description | Audio output |
| Data Type | {float, int, fract32} |
| Name | out2 |
| Description | Audio output |
| Data Type | {float, int, fract32} |
Matlab Usage
File Name: alignment_delay_subsystem.m
SYS=alignment_delay_subsystem(NAME, N, OUTPUTDELAY)
Creates a subsystem that aligns the delay of all input channels.
The module has multiple input pins and the same number of output pins. Each pin can
have a different number of channels, block size and sampling rate as long as they are real values in time domain.
The module aligns the accumulated output delay of all output pins to the
maximum accumulated input delay over all input pins if outputDelayMs
argument is empty. If outputDelayMs argument has a value and it is equal
or larger than the maximum accumulated input delay, it will align all
accumulated output delays to outputDelayMs.
Arguments:
NAME - name of the subsystem
N - number of input pins.
OUTPUTDELAY - the accumulated output delay in ms that all output are aligned with. If it's
empty the output delay will be aligned to the maximum of all
accumulated input delays. It has to be equal or larger than the maximum
accumulated input delay.
Copyright (c) 2026 DSP Concepts, Inc.