views:

103

answers:

1

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?

rw

+1  A: 

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.

Laurent Etiemble
When I save the file, will it be an aac file?
RW
As far as I know, the QTKit only capture audio and/or video to mov files (with the QTCaptureMovieFileOutput). The mov file can contains audio, video or both of them.
Laurent Etiemble