Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

initDone : 0 indicates that initialization failed, 4 indicates that the file name initialization was successful, and 1 means that initialization was successfulthe file is writing successfully

isActive : Used to control start/pause. On pause, the module stops capturing the audio data from the input pin.

...

Code Block
typedef struct _ModuleWaveFileSink
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    UINT32 cacheSize;                             // The size of the buffer that is used to store the audio samples captured from the input pin before the deferred set call issues a fwrite, defined in terms number of samples per channel (CACHESIZE * NUMCHANNELS)
    UINT32 sampleSize;                            // Size of the sample to be stored in the file (2 bytes / 4 bytes)
    INT32 isActive;                               // True means recording is active/started, false means recording is paused. Can be dynamically controlled in inspector
    INT32 initDone;                               // State variable, indicates initialization done state. Appears on the inspector
    UINT32 readIndex;                             // Current read-pointer of the cache memory
    UINT32 writeIndex;                            // Current write-pointer of the cache memory
    UINT32 fillLevel;                             // Current fill level in the cache
    UINT32 overRunCtr;                            // Counts the number of over runs, incremented when the cache overflows. Appears on the inspector
    INT32 errorCode;                              // Captures errors that could arise in the module C code. Appears on the inspector
    UINT32 totalNoSamples;                        // Total number of samples written into the output.wav
    INT32 fullFileSize;                           // Size of the array to hold the full file path for the output.wav file to be created
    INT32* fullFileName;                          // Complete file path for the output.wav file to be created
    fract32* cache;                               // The buffer used to store the audio samples from the input wire before the deferred set call issues a fwrite
    void * inFile;                                // File pointer to access the output wav file
} ModuleWaveFileSinkClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

cacheSize

uint

const

0

2048

Unrestricted

sampleSize

uint

const

0

2

Unrestricted

isActive

int

parameter

0

1

Unrestricted

initDone

int

state

0

0

Unrestricted

readIndex

uint

state

0

0

Unrestricted

writeIndex

uint

state

0

0

Unrestricted

fillLevel

uint

state

0

0

Unrestricted

overRunCtr

uint

state

0

0

Unrestricted

errorCode

int

state

0

0

Unrestricted

totalNoSamples

uint

const

0

0

Unrestricted

fullFileSize

int

const

0

2

Unrestricted

fullFileName

int*

parameter

1

[1 x 2]

Unrestricted

cache

fract32*

state

0

[0 x 0]

Unrestricted

inFile

void *

const

0

Unrestricted

Pins

Input Pins

Name: in

Description: Input audio

...