An instance of the AVAudioRecorder class, called an audio recorder, provides audio recording capability in your application.
Using an audio recorder you can:
Record until the user stops the recording
Record for a specified duration
Pause and resume a recording
Obtain input audio-level data that you can use to provide level metering
In OS X, the audio comes from the system's default audio input device as set by a user in System Preferences.
You can implement a subclass of AVFoundationMBS to respond to audio interruptions and audio decoding errors, and to the completion of a recording.
To configure a recording, including options such as bit depth, bit rate, and sample rate conversion quality, configure the audio recorder's settings dictionary. Use the settings keys described in AV Foundation Audio Settings Constants.
To configure an appropriate audio session for recording, refer to AVAudioSession Class Reference and AVAudioSessionDelegate Protocol Reference.
The AVAudioRecorder class is intended to allow you to make audio recordings with very little programming overhead. Other classes that can be used for recording audio in OS X include AVCaptureAudioDataOutput and the Audio Queue services described in the Audio Queue Services Programming Guide.
In OS X, you can also use the AVCaptureAudioFileOutput class to record audio.
Available in OS X v10.7 and later.
Calls audioRecorderEncodeErrorDidOccur and audioRecorderDidFinishRecording events on AVFoundationMBS class.