No type or protocol named AKNode / AKToggleable

I am trying to extend AKNode and AKToggelable, and this error appears in the file Project-Swift.h

What is the way to do this?

My class

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()
}
}

And the error messages in the Project-Swift.h file:

Cannot find interface declaration for 'AKNode', superclass of 'AKCustom'

No type or protocol named 'AKToggleable'
+4
source share
2 answers

add #import "AudioKit/AudioKit-Swift.h"in PROJECT-Bridging-Header.h. Then it AKNodewill be available at Project-Swift.h.

+1
source

AudioKit "", " AudioKit" iOS Mac. , , . , - , , .

+1

Source: https://habr.com/ru/post/1694577/


All Articles