Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Scroll Documents: Update page title prefix

Overview

Overlaps data into larger block sizes. The underlying time base is preserved.

Discussion

A rebuffer module converts from a smaller to a larger block size, with overlap. The module can support an artibrary number of channels and also supports any 32-bit data type (integer and floating-point). An internal buffer holds the overlap between samples.

...

Time

0

Buffer1

-

-

-

1

Buffer2

Buffer1

-

-

2

Buffer3

Buffer2

Buffer1

-

3

Buffer4

Buffer3

Buffer2

Buffer1

4

Buffer5

Buffer4

Buffer3

Buffer2

5

Buffer6

Buffer5

Buffer4

Buffer3

Type Definition

Code Block
typedef struct _ModuleRebuffer
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    INT32 outBlockSize;                           // Specifies the size of the output block. Positive values indicate a specific block size, in samples. Negative values specify a multiplicative factor between the input and output block sizes.
    INT32 overlap;                                // Number of samples of overlap between blocks. Set by the prebuild function.
    INT32 stateIndex;                             // Index of the oldest state variable in the array of state variables.
    FLOAT32* state;                               // State variable array.
} ModuleRebufferClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

outBlockSize

int

const

0

-2

-32:100000

overlap

int

const

1

32

Unrestricted

stateIndex

int

state

1

0

Unrestricted

state

float*

state

1

[32 x 1]

Unrestricted

Pins

Input Pins

Name: in

Description: audio input

...

Complex support: Real and Complex

Output Pins

Name: out

Description: audio output

Data type: {float, int, fract32}

MATLAB Usage

File Name: rebuffer_module.m

...