Adding external audio object into AudioworX package

External audio objects can be added to the framework without re-compiling the libraries provided by AudioworX. There are following use cases to be supported:

  • Third party audio object code to be compiled and linked (Source and headers placed in specific folder)
  • Third party audio object is already pre-compiled and libraries needs to be linked (header + library)

General assumption is that each use case can be satisfied for multiple 3rd party objects which are added to the extAudioObject.lib which itself needs to be linked to the application code on the target or to the xAFVirtualamp.dll based on one of the 3 mentioned use cases. It must be ensured all use cases can be used in parallel for different objects which means, every 3rd party object can be integrated individually by following one of the 3 proposed solutions or a combination of them. After a successful compilation and linking process a post-build step shall be applied to validate that all mandatory APIs for all added objects have been implemented correctly.

Common pre-requisites for all use cases

  • Define unique audio object id
    • #define OBJ_TEMPLATE 9001
    • extendable-audio-frameworkexternalincExternalObjAudioIds.h or project specific path and name
    • make sure the defined id is in the range of 9002 and 9999 and not used by any other object ID
    • object name, c++ class name and header file names are matching the name used in the #define. E.g. user is creating MyObject ->
      • #define OBJ_MYOBJECT 9002;
      • C++ class name CMyObject (C is mandatory, camel case is optional)
      • MyObject.h
      • MyObjectMemRecs.h
      • MyObjectToolbox.h
    • Tell the build script which files to be picked up
      • Directly in cmake by adding cpp files and libraries to be compiled and linked
      • Path to a CmakeLists.txt file containing all required information

Third party code to be compiled and linked (Source and headers placed in specific folder)

The external 3rd party build solution allows the developer to add source files, header files and libraries into a predefined folder structure. The Template audio object shall be used as a reference example on how to implement the third party code the for the external object. The CMakeLists.txt in the external folder must be modified accordingly to include the newly added cpp file(s) and library(s).

Folder structure for external audio object.

Third party object is pre-compiled and needs to be linked only (header + library)

This use case assumes that external object(s) has been build according to AWX specifications and the result of this build is supposed to be linked to other audio objects in the xAFVirtualAmp.dll. To achieve this, the developer must add the following files into the external sub folders:

  • Inc
    • Myobject.h
    • MyobjectMemRecs.h
    • MyobjectToolbox.h
  • Lib
    • xafMyObject-lib_release.ext (.ext ==.lib, .dlb, etc. based on the target)
    • MyObjectPrivate.ext

The folder structure and naming inside the lib folder must match the ones which are released within the xafpubliclib. The developer must ensure, that libraries are available for all supported targets (WIN64, Sharc, etc.) and placed properly in the correct sub-folders. In addition to that, the CMakeLists.txt must be changed to link the additionally added libraries. The Release cmake file will have a section with proper comments on how to do so. There will be additional .bat file will be provided to make it convenient for the end user for linking and creating .dll