Apple FilterDemo Audio Unit
Apple says: “this sample shows how to write a basic filter audio unit with a custom Cocoa user interface.”
First, download the source code from here.
Save the files to a new folder and open the project file. You will need to upgrade a copy of the project for the latest versions of XCode.
When you first build the project, you will see that, like any project made using the template, you will get the following link error:
/usr/bin/ld: Undefined symbols: CAVectorUnit::CheckVectorUnit() CAVectorUnit::sVectorUnitType collect2: ld returned 1 exit status
To prevent this, you need to add links to the following existing files to the Source folder of the project:
/Developer/Examples/CoreAudio/PublicUtility/CAVectorUnit.cpp
and
/Developer/Examples/CoreAudio/PublicUtility/CAVectorUnit.h
Do this by control-clicking on the Source folder in XCode Groups & Files pane, and selecting the Add > Existing Files… context menu. The default dialog settings will add a link to the files as required.
Now build the project again, copy the built .component file into either /Library/Audio/Plug-Ins/Components or the current user’s ~/Library/Audio/Plug-Ins/Components folder.
Use auval -a to list all Audio Units, and verify that the Filter AU is listed. Now you can use auval -v to test the demo and finally try AULab or GarageBand? to run some audio through it.
That’s it!