It looks like using core audio to record audio is overly complicated. While QTkit is basic and down to earth However. All of the examples I have see integrate video and audio together. Does some one have or know an example of using QTkit for recording audio?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Here is an example of using QTKit for recording audio.
回答2:
In order to capture audio only, you have to either select the default device that supports sounds, or disable video connection on muxed devices.
// Get the default sound capture device
QTCaptureDevice *theDefaultSoundDevice = [QTCaptureDevice defaultInputDeviceWithMediaType: QTMediaTypeSound];
To learn how to disable connection on muxed devices, see the QTKit Application Programming Guide. The sample code in the guide shows how to disable audio, so you just have to disable video instead.