using QTkit for recording audio

倖福魔咒の 提交于 2019-12-10 11:06:27

问题


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.



来源:https://stackoverflow.com/questions/2937720/using-qtkit-for-recording-audio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!