小编Osm*_*man的帖子

我想将输入节点的采样率从 44100 更改为 8000

我想将麦克风中的缓冲区读入一个数组,44.1khz 工作正常,但采样率为 8khz 时出现错误

ERROR:    >avae> AVAudioIONodeImpl.mm:884: SetOutputFormat: required condition is false: format.sampleRate == hwFormat.sampleRate
2016-11-26 19:32:40.674 Atem[5800:1168274] *** Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: format.sampleRate == hwFormat.sampleRate'
Run Code Online (Sandbox Code Playgroud)

使用我的以下代码:

 var engine = AVAudioEngine()
    func setup() {

    print("new")
    let input = engine.inputNode!
    let bus = 0

    let mixer = AVAudioMixerNode()
    engine.attach(mixer)

    engine.connect(input, to: mixer, format: input.outputFormat(forBus: 0))
    //pcmFormatFloat64 -- pcmFormatFloat32
    print(engine.isRunning)
    let fmt = AVAudioFormat(commonFormat: .pcmFormatFloat32, sampleRate: 12000, channels: 1, interleaved: true)

    do {
        try …
Run Code Online (Sandbox Code Playgroud)

audio buffer avfoundation swift3 xcode8

6
推荐指数
1
解决办法
5571
查看次数

WatchKit 错误,显示“配对的 Apple 手表没有符号” watchOS 3.1

我正在尝试在 watchos3.1 上开发我的应用程序,每次出现此错误时我都会收到。

no symbols for paired Apple watch
Run Code Online (Sandbox Code Playgroud)

Xcode 不会为我的 watchOS 3.1 下载最新的符号。在我的折叠

Library->Developer->Xcode->watchOS DeviceSupport-> 
Run Code Online (Sandbox Code Playgroud)

我只找到一个带有“watch1,2 3.0”的文件

我如何用 3.1 下载文件?

debugging swift3 watchos-3 xcode8

3
推荐指数
1
解决办法
1737
查看次数

标签 统计

swift3 ×2

xcode8 ×2

audio ×1

avfoundation ×1

buffer ×1

debugging ×1

watchos-3 ×1