问题
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