Audio Units

Audio Units can be tricky to work with as they are a bit notorious for holding on to old versions you thought you had already removed, failing to load anything at all, and providing little information suitable for diagnosing. No doubt millions of users have banged their head against this issue and there is little help to be found other than to keep rebooting, keep refreshing, crossing your fingers that it works.

So with all that said, here is a set of commands which have so far given me the best results:

Force refresh

First thing to try is to force a refresh of the Audio Component Registrar. This is the service which keeps track of all the installed Audio Units. By sending a kill signal to this process, it will be forced to reload all the Audio Units from disk. This can sometimes be enough to get things working again. You may need to precede this command with “sudo” if you don’t have permission to kill the process.

killall -9 AudioComponentRegistrar

Check status

With the service refreshed, you can issue the following command to list all the Audio Units currently loaded, including the file paths. Knowing this path is critical information because the operating system will install AUv3 plug-ins from anywhere, you don’t even need to have instructed it to do so. They are “sticky” in that way which can cause a lot of confusion.

In the example below, we can see two AUv2 plug-ins are loaded, both installed in the usual location in Library.

caustik@Aarons-Mac-mini APU % auval -al
aufx apuC APUX  -  APU Software: APU Loudness Compressor     (file:///Library/Audio/Plug-Ins/Components/APU%20Loudness%20Compressor.component/)
aufx apuM APUX  -  APU Software: APU Loudness Meter     (file:///Library/Audio/Plug-Ins/Components/APU%20Loudness%20Meter.component/)

AUv3

Let’s say, after the above, you build a plug-in which contains an AUv3 version. It turns out, when you build this AUv3 version, it will be registered wherever it happens to be on disk, and will even silently override the component we installed previously:

caustik@Aarons-Mac-mini APU % auval -al
aufx apuC APUX  -  APU Software: APU Loudness Compressor     (file:///Users/caustik/_work/APU/APU/APU/plugins/LoudnessCompressor/Builds/MacOSX/build/Debug/APU%20Loudness%20Compressor.app/Contents/PlugIns/APU%20Loudness%20Compressor.appex/)
aufx apuM APUX  -  APU Software: APU Loudness Meter     (file:///Library/Audio/Plug-Ins/Components/APU%20Loudness%20Meter.component/)

As a developer, this behavior was the source of many headaches. In order to resolve this conflict, you need to remove the AUv3 from disk and then force a refresh of the Audio Component Registrar. This leaves you with the AUv2 version remaining. Let’s see the process step-by-step, including what happens after you’ve removed the AUv3 but haven’t yet forced a refresh:

caustik@Aarons-Mac-mini APU % rm -rf /Users/caustik/_work/APU/APU/APU/plugins/LoudnessCompressor/Builds/MacOSX/build/Debug/APU\ Loudness\ Compressor.app/
caustik@Aarons-Mac-mini APU % auval -al
aufx apuC APUX  -  APU Software: APU Loudness Compressor     (unknown URL)    Cannot open component: -1
aufx apuM APUX  -  APU Software: APU Loudness Meter     (file:///Library/Audio/Plug-Ins/Components/APU%20Loudness%20Meter.component/)
caustik@Aarons-Mac-mini APU % killall -9 AudioComponentRegistrar
caustik@Aarons-Mac-mini APU % auval -al
aufx apuC APUX  -  APU Software: APU Loudness Compressor     (file:///Library/Audio/Plug-Ins/Components/APU%20Loudness%20Compressor.component/)
aufx apuM APUX  -  APU Software: APU Loudness Meter     (file:///Library/Audio/Plug-Ins/Components/APU%20Loudness%20Meter.component/)

Once you’ve managed to clean out the results of what auval is showing, you can actually test validate the plug-in as well. Note the parameters here match the plug-in types from the above “auval -al” commands.

auval -strict -stress -v aufx apuM APUX