AVAudioRecorderDelegate Protocol Reference

Conforms to
Framework
/System/Library/Frameworks/AVFoundation.framework
Availability
Available in OS X v10.7 and later.
Declared in
AVAudioRecorder.h

Overview

The delegate of an AVAudioRecorder object must adopt the AVAudioRecorderDelegate protocol. All of the methods in this protocol are optional. They allow a delegate to respond to audio interruptions and audio decoding errors, and to the completion of a recording.

Tasks

Responding to the Completion of a Recording

Responding to an Audio Encoding Error

Instance Methods

audioRecorderDidFinishRecording:successfully:

Called by the system when a recording is stopped or has finished due to reaching its time limit.

- (void)audioRecorderDidFinishRecording:(AVAudioRecorder *)recorder successfully:(BOOL)flag
Parameters
recorder

The audio recorder that has finished recording.

flag

TRUE on successful completion of recording; FALSE if recording stopped because of an audio encoding error.

Discussion

This method is not called by the system if the audio recorder stopped due to an interruption.

Availability
  • Available in OS X v10.7 and later.
Declared In
AVAudioRecorder.h

audioRecorderEncodeErrorDidOccur:error:

Called when an audio recorder encounters an encoding error during recording.

- (void)audioRecorderEncodeErrorDidOccur:(AVAudioRecorder *)recorder error:(NSError *)error
Parameters
recorder

The audio recorder that encountered the encoding error.

error

The encoding error.

Availability
  • Available in OS X v10.7 and later.
Declared In
AVAudioRecorder.h