Hi,
I’m developing a custom module in Audio Weaver (AWE) that needs to handle int32 PCM audio data. In this setup, I’m trying to pass an existing int32 PCM buffer directly to the module’s output wire, without passing data from the awe_audioImportSamples()
.
To support this, I’ve changed the output wire type to int32
, and within the module’s Process()
function, I assign my PCM buffer to the wire’s output buffer (as shown below). The module compiles and runs, and the audio path is connected properly within the AWE designer.
AWE_MOD_FAST_CODE
void awe_modProcess(void *pInstance)
{
awe_modInstance *S = (awe_modInstance *)pInstance;
WireInstance **pWires = ClassModule_GetWires(S);
UINT32 numSamples = ClassWire_GetNumSamples(pWires[0]);
//UINT32 *pSrc = (UINT32 *)(pWires[0]->buffer);
INT32 *pDst = (INT32 *)(pWires[1]->buffer);
UINT32 i;
INT32 *temp_buf = (INT32*)g_txbuf;
for (i = 0; i < numSamples; i++)
{
*pDst++ = *temp_buf++;
}
}
However, the issue is that the output audio is distorted. It is audible, but sounds incorrect—almost as if the data is being interpreted in the wrong format or with the wrong scaling. I suspect that either the format expected by the output wire is different from what I’m providing, or that I’ve skipped a step that’s normally handled inside awe_audioImportSamples()
.
I’d like to understand how AWE expects int32 PCM data to be formatted when passed directly to output wires, and whether bypassing awe_audioImportSamples()
is advisable in this kind of workflow.
Any insights or guidance from those with experience in custom module development within AWE would be greatly appreciated.
Thank you ,
Monika V.
11:32am
Hello Monika,
Are the wires going into and out of your custom module showing Int as the data type where my attached screenshot shows Float? (To show wire info go to View -> Wire Info)
If not, you can change the data type of a channel going into your module with the "Type Convert" module.