I’m developing a custom Audio Weaver module that processes input data read from a file. The intended data flow is:
1. Input buffer is filled with data read from a file (type: int32_t).
2. This buffer is assigned to pDmaRxBuf of AWE input then is passed to layout via awe_audioImportSamples.
3. The wire is routed to a custom module, where the input is received via pSrc.
4. The custom module processes the input and generates output.
Issue:
- When the file-based buffer is passed through the wire, the data received in pSrc inside the custom module is incorrect.
- However, if the same buffer is accessed inside the module using an extern variable directly (without routing through a wire), the data is received correctly and the output is as expected.
Details:
- Input buffer data type: int32_t
- AWE HW input format: float32_t
- The input data is known to be valid and well-formed before passing through the wire.
My Questions:
1. What is the correct way to pass a file-based buffer to a custom module via a wire in Audio Weaver?
2. Why might the data in pSrc be invalid when passed through a wire, but valid when accessed externally?
3. What is the recommended method to handle data type differences (int32_t → float32_t) to ensure clean handoff through the signal path?
4. Since pSrc is a buffer containing pointers to audio sample arrays (samples × channels), is it valid to assign one of these to a local pointer for easier access inside the module? For example: `float *input = (float *)pSrc[0];`
- If valid, could you provide an example of correct usage or recommended handling for this kind of pointer assignment?
Your guidance and any example code would be greatly appreciated.
Best regards,
Monika V