Document toolboxDocument toolbox

(8.D.2.4) BlockCounter

Overview

Increments internal counter per call and sends the count value on control output pin

Discussion

This module has internal counter and it is incremented for everytime the module called. The count value is copied on to control output pin. User has to specify the sample rate of the module because it is a source type module.

Type Definition

typedef struct _ModuleBlockCounter { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure INT32 counter; // Internal counter increments per call. } ModuleBlockCounterClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

counter

int

state

1

0

Unrestricted

 

Pins

Output Pins

Name: out

Description: count value

Data type: int

MATLAB Usage

File Name: block_counter_module.m

M=block_counter_module(NAME, SAMPLERATE) Creates a block counter module for use with the Audio Weaver environment. The module increments internal counter everytime it is called and outputs the count value on control output pin. Arguments: NAME - name of the module. SAMPLERATE - sample rate of the input channels (optional)

Â