This section discusses examples which illustrate advanced module design techniques. The modules are part of the Examples module library introduced in (8.D.2.7) Scaler Smoothed Module Example. In addition to the scaler_smoothed_example_module.m, this library contains the following:
...
The processing code is contained in the file InnerScalerExample_Process.c.
Code Block |
---|
M.moduleBrowser.path = 'Examples';
M.moduleBrowser.image = '../images/ExamplesIcon.bmp';
M.moduleBrowser.searchTags = 'gain volume';
M.shapeInfo.basicShape = 'triangle';
M.shapeInfo.legend = 'gain';
The processing code is contained in the file InnerScalerExample_Process.c.
awe_modScalerExampleInstance *S = (awe_modScalerExampleInstance *)pInstance;
WireInstance **pWires = ClassModule_GetWires(S);
FLOAT32 *inPtr;
FLOAT32 *outPtr;
INT32 sample, numSamples;
inPtr = (FLOAT32 *)(pWires[0]->buffer);
outPtr = (FLOAT32 *)(pWires[1]->buffer);
numSamples = (INT32) ClassWire_GetNumSamples(pWires[0]);
for(sample = 0; sample < numSamples; sample++)
{
outPtr[sample] = inPtr[sample] * S->gain;
} |
...