Tap Mic Input Using AVAudioEngine in Swift
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm really excited about the new AVAudioEngine. It seems like a good API wrapper around audio unit. Unfortunately the documentation is so far nonexistent, and I'm having problems getting a simple graph to work. Using the following simple code to set up an audio engine graph, the tap block is never called. It mimics some of the sample code floating around the web, though those also did not work. let inputNode = audioEngine . inputNode var error : NSError ? let bus = 0 inputNode . installTapOnBus ( bus , bufferSize : 2048 , format :