【发布时间】:2018-03-07 09:14:55
【问题描述】:
我正在尝试扩展 AKNode 和 AKToggelable,但此错误出现在 Project-Swift.h 文件中
这样做的方法是什么?
我的课是
class AKCustom: AKNode, AKToggleable, AKComponent, AKInput {
public typealias AKAudioUnitType = AKBalancerDeplikeAudioUnit
public static let ComponentDescription = AudioComponentDescription(mixer: "dpba")
private var internalAU: AKAudioUnitType?
open dynamic var isStarted: Bool {
return internalAU?.isPlaying() ?? false
}
public init( _ input: AKNode? = nil) {
_Self.register()
super.init()
AVAudioUnit._instantiate(with: _Self.ComponentDescription) { [weak self] avAudioUnit in
self?.avAudioNode = avAudioUnit
self?.internalAU = avAudioUnit.auAudioUnit as? AKAudioUnitType
input?.connect(to: self!)
}
}
open func start() {
internalAU?.start()
}
open func stop() {
internalAU?.stop()
}
}
Project-Swift.h 文件中的错误信息:
Cannot find interface declaration for 'AKNode', superclass of 'AKCustom'
No type or protocol named 'AKToggleable'
【问题讨论】:
-
什么是AKNode?它在什么框架中?
-
AKNode 是 AudioKit 框架中的一个类 /// AudioKit 中所有节点的父类 @objc open class AKNode : NSObject { }
-
貌似不是标准iOS框架的一部分,需要安装...audiokit.io/docs/index.htmliOS框架是
CoreAudioKit