我已经通过以下步骤创建了一个带有音频单元扩展的小测试应用程序:
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.
为了清楚起见,我根本没有编辑模板代码。
当我运行auval
时,我得到以下内容:
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
我认为Apple的模板是正确的,所以这可能是我系统上的配置问题。实际上,我在Xcode控制台中收到以下令人不安的消息:
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.
很可能还有一些其他音频单元正在使用Component Manager
,因为我正在使用Xcode的模板创建一个全新的应用。
但是,Apple自己的AUV3FilterDemo可以正常工作。所以也许这条消息是一个红色的鲱鱼。
Apple的模板是否应该开箱验证?
更新
通过删除其他插件,我能够避免v2 API警告,所以它确实是一个红色的鲱鱼。
答案 0 :(得分:1)
Xcode auv3模板未能实现输入和输出总线及其各自阵列的创建。只有评论作为占位符。您需要在初始化时执行此操作,并实现inputBusses和outputBusses访问器方法。看看Apple Developer AUv3示例项目如何执行此操作。无论如何,这是一个很好的起点。