2017-03-15 74 views
1

至於主題主題,我想分析輸出信號的緩衝區。我已經使用這個功能(InstallTapOnBus)作爲麥克風信號,但是我不能用於輸出。任何人都知道怎麼做?InstallTapOnBus - 用於輸出信號

let bus = 0 
    let node = engine.outputNode 
    node.installTap(onBus: bus, bufferSize: AVAudioFrameCount(BUFFER_SIZE), format: node.outputFormat(forBus: bus), block: { (buffer : AVAudioPCMBuffer ,time : AVAudioTime) in 

     ... 

    }) 
    try! engine.start() 
} 

它爲我提供了一個錯誤:「所需的條件爲假:_isInput」

回答

0

你試過拍打混頻器,而不是直接將麥克風?

Microphone-to-mixer-to-output with Mixer Tap