...
Most modules supplied with Audio Weaver take advantage of this overflow behavior to smoothly transition from internal to external memory once the heaps have filled up.
Module Function Details
Anchor | ||||
---|---|---|---|---|
|
Each audio module has a set of 5 functions associated with it. This section describes the arguments to each of the functions.
Constructor Function
Anchor | ||||
---|---|---|---|---|
|
This function is usually generated by MATLAB but at times it needs to be hand written – especially if the module does more than just allocate memory. Audio Weaver names the constructor function using the convention
...
Info |
---|
There is no need to manually call the Set function within the Constructor. The framework takes care of this. |
Processing Function
Anchor | ||||
---|---|---|---|---|
|
The processing function has the signature
...
The processing function does not return an error code. If you need to track error conditions, do this by adding an error code to the instance structure and then tracking it in the inspector.
Set Function
Anchor | ||||
---|---|---|---|---|
|
This function implements a module's control functionality and typically converts high-level variables to low-level variables. The PeakHold module has the function signature
...
A few more things to keep in mind regarding masks. When an array variable is set, the bit mask corresponding to the array is set as expected. However, the Set function is not told which portion of the array has been changed. Finally, since the mask is only 32 bits in length, it is possible to run out of unique bits if the instance structure is very long. The high bit of the mask, bit 31, has special meaning. When this bit is set, it indicates that at least one of the high order instance variables has changed. However, you don't know precisely which one.
Get Function
Anchor | ||||
---|---|---|---|---|
|
This function is rarely used in practice and translates low-level variables to higher-level variables. This function has the same signature as the Set function
...
When called, the function should update instance variables and can use the mask argument to determine which variables should be updated.
BypassFunction
Anchor | ||||
---|---|---|---|---|
|
This function implements a module's bypass functionality. The function signature is identical to the processing function
...