简体   繁体   中英

AudioKit.output setter crashes with SIGABRT

I'm new to AudioKit and I was looking at the playground tutorials to get started. I downloaded the playgrounds yesterday from the website and compiled the playgrounds project and ran the "Hello World" tutorial but it errored at

AudioKit.output = oscillator

I thought it was maybe a problem with the playground so I downloaded the framework for MacOS (version 4.2.2) and added it to a new Xcode project and wrote this function:

import AudioKit

func doAudio() {
do {
    let oscillator = AKOscillator()

    AudioKit.output = oscillator
    try AudioKit.start()

    oscillator.start()

    sleep(1)
} catch {
    print(error)
}
}

Which is copied from the tutorials. When calling this function I get SIGABRT on

AudioKit.output = oscillator

The error happens whenever the AudioKit.output setter is called. Did I forget to install something? I have read all the instructions on the website. I run Xcode version 9.4.1 (9F2000) and macOS HighSierra 10.13.5 (17F77)

I found the problem. It doesn't work if you have an external audio interface plugged into your computer. When disconnected it works fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM