2017-03-15 42 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