Custom modules' process and set functions are written in C, and supplemented with matlab scripts for usage in Designer. There is more information about the various methods of bring IP into Audio Weaver, and writing custom modules on the Doc Hub here: https://documentation.dspconcepts.com/awe-designer/latest-version/bringi...
/**
* @brief Initialize the C library wrapper for the SDK CPP class
* @return This pointer to the SDK class
*/
void *SDKInit(void)
{
#ifdef WIN32
return NULL;
#else
SDKClass * pSDKInstance = new SDKClass();
return (void *)pSDKInstance;
#endif
}
/**
* @brief SDK method
* @param [in] pSDKInstance This pointer to the SDK class
* @return 0 or error code
*/
int SDKMethod(void *pSDKInstance)
{
SDKClass * pSDK = (SDKClass *)pSDKInstance;
int ret = 0;
3:02am
Hello DSPC,
Could you please answer the question?
Best regards,
9:35am
Hello Mako,
Custom modules' process and set functions are written in C, and supplemented with matlab scripts for usage in Designer. There is more information about the various methods of bring IP into Audio Weaver, and writing custom modules on the Doc Hub here: https://documentation.dspconcepts.com/awe-designer/latest-version/bringi...
9:58pm
Hello Kyle-san,
Thank you for your answer.
Many of our sound IPs are written in C++, am I correct in my understanding that they are not available?
Best regards,
2:10pm
Hello,
Audio Weaver modules are written in C. It may be possible to use C++ but steps would need to be taken to ensure compatibility with C.
3:34am
Hello Kyle-san,
Could you please tell me exactly what steps to take to ensure compatibility with C?
Best regards,
5:59am
==================================== INCLUDE FILE ==============================================
/* Enter C naming convention */
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
/**
* @brief Initialize the C library wrapper for the SDK CPP class
* @return This pointer to the SDK class
*/
void *SDKInit(void);
/**
* @brief SDK method
* @param [in] pSDKInstance This pointer to the SDK class
* @return 0 or error code
*/
int SDKMethod(void *pSDKInstance);
====================================== END INCLUDE FILE ====================================
====================================== CPP SOURCE FILE =====================================
/**
* @brief Initialize the C library wrapper for the SDK CPP class
* @return This pointer to the SDK class
*/
void *SDKInit(void)
{
#ifdef WIN32
return NULL;
#else
SDKClass * pSDKInstance = new SDKClass();
return (void *)pSDKInstance;
#endif
}
/**
* @brief SDK method
* @param [in] pSDKInstance This pointer to the SDK class
* @return 0 or error code
*/
int SDKMethod(void *pSDKInstance)
{
SDKClass * pSDK = (SDKClass *)pSDKInstance;
int ret = 0;
try
{
ret = pSDK->SDKMethod();
}
catch (...)
{
return -1;
}
return ret;
}
====================================== END CPP SOURCE FILE =====================================
====================================== C SOURCE FILE =====================================
S->pSDK = SDKInit();
if (S->pSDK == NULL)
{
return 0;
}
*pStatusOut = SDKMethod(S->pSDK);
====================================== END C SOURCE FILE =====================================