Xcode Audio Unit v3 模板验证失败
Xcode Audio Unit v3 template fails validation
我通过以下步骤创建了一个带有音频单元扩展的小测试应用程序:
- 打开 Xcode 并创建一个新的 "Cocoa Application" 项目
- Select 文件 -> 新建 -> 目标
- Select "Audio Unit extension"
- 用合理的值填写表格(我已经测试了乐器和 Midi 效果类型)
- "Run" 分机
- Select "Logic Pro X" 作为主机应用程序
- 逻辑启动且插件验证失败:
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 警告,所以它确实是一个转移注意力的问题。
Xcode auv3 模板未能实现输入和输出总线及其各自数组的创建。只有评论作为占位符。您需要在初始化时执行此操作,并实现 inputBusses 和 outputBusses 访问器方法。在 Apple Developer AUv3 示例项目中查看这是如何执行的。无论如何,这是一个很好的起点。
我通过以下步骤创建了一个带有音频单元扩展的小测试应用程序:
- 打开 Xcode 并创建一个新的 "Cocoa Application" 项目
- Select 文件 -> 新建 -> 目标
- Select "Audio Unit extension"
- 用合理的值填写表格(我已经测试了乐器和 Midi 效果类型)
- "Run" 分机
- Select "Logic Pro X" 作为主机应用程序
- 逻辑启动且插件验证失败:
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 警告,所以它确实是一个转移注意力的问题。
Xcode auv3 模板未能实现输入和输出总线及其各自数组的创建。只有评论作为占位符。您需要在初始化时执行此操作,并实现 inputBusses 和 outputBusses 访问器方法。在 Apple Developer AUv3 示例项目中查看这是如何执行的。无论如何,这是一个很好的起点。