Search code examples
audiokit

cannot find AudioEngine in scope


Briefly, I have installed AudioKit XCFramework, imported AudioKit into a simple class and, as per migration guide, tried to create an instance of Audio engine instead of the old 4.0 AudioKit singleton.

Steps 1: made frameworks folder , pasted AudioKit XCFramework into it 2: embedded and signed AudioKit in project settings 3: updated other linker flags to include -lc++ 4: updated framework search paths to include path to Audiokit 5: Wrote simple class with code below

import AudioKit
class AkStart {
var mix = AKMixer()
init(){
    let engine = AudioEngine()
    engine.output = mix
    engine.start()
}

}

I get an error preventing compilation reading: "cannot find 'AudioEngine' in scope" my Xcode version is 12.3, Im using SwiftUI, and AudioKit XCFramework AudioKit version at time of writing 5.0 Are there additional input statements or steps in the framework installation that I also need to include?


Solution

  • I think all of your questions would be answered by watching the Office Hours I've posted to YouTube: https://www.youtube.com/channel/UCLLYNAal3aJpaFl4WluRCvw

    And feel free to join in the next one. I post the link on the AudioKitMan twitter feed.