| Conforms to | |
| Framework | /System/Library/Frameworks/AVFoundation.framework |
| Availability | Available in iPhone OS 3.0 and later. |
| Declared in | AVAudioRecorder.h |
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.
Called when the audio session is interrupted during a recording, such as by an incoming phone call.
- (void)audioRecorderBeginInterruption:(AVAudioRecorder *)recorder
The audio recorder whose recording was interrupted.
Upon interruption, your application’s audio session is deactivated and the audio recorder pauses. You cannot use the audio recorder again until you receive a notification that the interruption has ended.
AVAudioRecorder.hCalled by the system when a recording is stopped or has finished due to reaching its time limit.
- (void)audioRecorderDidFinishRecording:(AVAudioRecorder *)recorder successfully:(BOOL)flag
The audio recorder that has finished recording.
TRUE on successful completion of recording; FALSE if recording stopped because of an audio encoding error.
This method is not called by the system if the audio recorder stopped due to an interruption.
AVAudioRecorder.hCalled when an audio recorder encounters an encoding error during recording.
- (void)audioRecorderEncodeErrorDidOccur:(AVAudioRecorder *)recorder error:(NSError *)error
The audio recorder that encountered the encoding error.
The encoding error.
AVAudioRecorder.hCalled when an interruption ends, such as by a user ignoring an incoming phone call.
- (void)audioRecorderEndInterruption:(AVAudioRecorder *)recorder
The paused audio recorder whose interruption has ended.
For an audio recorder’s delegate to receive this message, the audio recorder must have been recording when the interruption started. When an interruption ends, the audio session for your application is automatically reactivated, allowing your application to interact with the audio recorder. To resume recording, call the record method.
AVAudioRecorder.hLast updated: 2009-11-17