0

I've created a little test app with an Audio Unit extension via the following steps:

  1. Open Xcode and create a new "Cocoa Application" project
  2. Select File -> New -> Target
  3. Select "Audio Unit extension"
  4. Fill out the form with reasonable values (I've tested both Instrument and Midi Effect types)
  5. "Run" the Extension
  6. Select "Logic Pro X" as the host app
  7. Logic starts and plugin validation fails: While verifying Audio Unit compatibility, Logic Pro X encountered 1 Audio Unit plug-in(s) which did not pass the Apple AU validation. These plug-ins have been excluded from further usage in Logic Pro X to prevent possible problems or crashes. You can start the Plug-In Manager now to review the validation results or continue the startup process.

Just to be clear, I did not edit the template code at all.

When I run auval I get the following:

validating Audio Unit Instrument by ADLS:

    AU Validation Tool
    Version: 1.6.1a1 
    Copyright 2003-2013, Apple Inc. All Rights Reserved.
    Specify -h (-help) for command options

--------------------------------------------------
VALIDATING AUDIO UNIT: 'aumu' - 'qqqq' - 'ADLS'
--------------------------------------------------
Manufacturer String: ADLS
AudioUnit Name: Instrument
Component Version: 1.6.0 (0x10600)

* * PASS
--------------------------------------------------
TESTING OPEN TIMES:
COLD:
Time to open AudioUnit:         213.911 ms
WARM:
Time to open AudioUnit:         100.937  ms
This AudioUnit is a version 3 implementation.
FIRST TIME:
FATAL ERROR: Initialize: result: -50


validation result: couldn't be opened

I would assume Apple's templates are correct, so this may be a configuration problem on my system. Indeed, I get the following disconcerting message in the Xcode console:

2016-08-31 13:15:25.602 Logic Pro X[51763:12817003] 13:15:25.602 WARNING:
  140: This application, or a library it uses, is using the deprecated Carbon
 Component Manager for hosting Audio Units. Support for this will be 
removed in a future release. Also, this makes the host incompatible with 
version 3 audio units. Please transition to the API's in AudioComponent.h.

Most likely there is some other Audio Unit that is using the Component Manager, since I'm creating a brand new app using Xcode's template.

However, Apple's own AUV3FilterDemo works correctly. So perhaps this message is a red herring.

Are Apple's templates supposed to validate out of the box?

Update

By removing other plugins I was able to avoid the v2 API warning, so it was indeed a red herring.

Taylor
  • 5,871
  • 2
  • 30
  • 64

1 Answers1

1

The Xcode auv3 template misses to implement creation of the input and output busses and its respective arrays. There are just comments as placeholders. You need to do this in initialize and also implement the inputBusses and outputBusses accessor methods. Have a look in the Apple Developer AUv3 example project how this is performed. It is anyway a good starting point.