(8.D.2.6) OverlapAddFract32
Overview
Overlap and add method
Discussion
The OverlapAddFract32 module implements the "overlap add" processing found in many frequency domain algorithms. At instantiation time you specify the blockSize of the input pin (ILEN) and the blockSize of the output pin (OLEN). The module allocates an internal state buffer of size ILEN words at instantiation time.
The processing function first takes the input data and adds it to the internal state buffer. Next, it copies OLEN of the oldest samples and writes this to the output buffer. Finally, it shifts the state buffer by OLEN samples.
The module is designed to work on multiple channels.
Type Definition
typedef struct _ModuleOverlapAddFract32
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
INT32 stateIndex; // Index of the oldest state variable in the array of state variables
INT32 overlapLength; // Number of samples to be overlapped
INT32 channelCount; // Number of channels
fract32* state; // State variable array
} ModuleOverlapAddFract32Class;
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
stateIndex | int | state | 1 | 0 | Unrestricted | Â |
overlapLength | int | const | 1 | 256 | Unrestricted | Â |
channelCount | int | state | 1 | 1 | Unrestricted | Â |
state | fract32* | state | 1 | [256 x 1] | Unrestricted | Â |
Pins
Input Pins
Name: in
Description: audio input
Data type: fract32
Channel range: Unrestricted
Block size range: 256
Sample rate range: Unrestricted
Complex support: Real
Output Pins
Name: out
Description: audio output
Data type: fract32
MATLAB Usage
File Name: overlap_add_fract32_module.m
M=overlap_add_fract32_module(NAME, WLEN, OLEN)
Creates a module which implements the overlap and add method.
Arguments:
NAME - name of the module.
OLEN - output sequence length after aliasing.
Â