Versions Compared

Key

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

Overview

Updates the sample rate of each module wire in the system

Discussion

The module is designed to update the sample rate of all the wires in the system.

...

In the typical use case, when the sample rate of the running target changes it causes the target firmware to use Control I/O to change the .sampleRate variable thus allowing the running layout to match processing to the new sample rate running on the target

Type Definition

Code Block
typedef struct _ModuleUpdateSampleRate
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    FLOAT32 sampleRate;                           // Desired sample rate
    FLOAT32 initialSampleRate;                    // Default sample rate of the system. Updated during the construction time.
    INT32 updateActive;                           // Flag to control the state of the boolean output pin.
    FLOAT32* wireSR;                              // Array of all modules wire sample rate info
} ModuleUpdateSampleRateClass;

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

sampleRate

float

parameter

0

48000

Unrestricted

initialSampleRate

float

state

1

48000

Unrestricted

updateActive

int

state

1

0

0:1:1

wireSR

float*

state

1

[1 x 1]

Unrestricted

Pins

Input Pins

Name: dummy

Description: Attach to system input pin

...

Sample rate range: Unrestricted

Complex support: Real

Output Pins

Name: updateActive

Description: Boolean indicating that sample rates are being updated

Data type: int

MATLAB Usage

File Name: update_sample_rate_module.m

...