Basic audio objects (BAOs) can be linked individually, versus linking all of them, to optimize memory.
All BAO’s are always compiled, but linking is controlled by modifying a file which includes object ID’s. Simply comment out an object ID definition from the header belowand re-run the cmake to stop linking an object.
AudioObjectIDs.h
By default, this file is used by the internal CMAKE to select which BAO’s are linked. It is located in public/include. Note, AudioIO and ControlIn are always linked. Users can edit this file directly, or supply their own file.
To supply your own AudioObjectID header :
- Copy the existing AudioObjectIDs.h file to use as your base (these ID’s are important! do not change)
- In your CMAKE which calls the external/src cmake, set the variable below to your header file path
- ID_PATH_BAO
- If you do not set this variable, the script will default to the file in public/include
What happens:
- CMAKE runs a python script which crosschecks all ID’s provided to it through headers, with the include paths provided. (BAO header paths are provided for you)
- All successful matches are added to the external audio object switch statement that creates the objects. This is the only actual reference to the class, and causes the linkage.