iPhone OS Reference Library Apple Developer Connection spyglass button

AVAudioSessionDelegate Protocol Reference

Conforms to
Framework
/System/Library/Frameworks/AVFoundation.framework/
Availability
Available in iPhone OS 3.0 and later.
Companion guide
Declared in
AVAudioSession.h

Overview

The delegate of an AVAudioSession object must adopt the AVAudioSessionDelegate protocol. All of the methods in this protocol are optional. They allow a delegate to respond to the following sorts of changes in state:

An AVAudioSession delegate can respond to interruptions at the audio session level. You can use this interface along with any iPhone OS audio technology. For example, your AVAudioSession delegate can handle interruptions for OpenAL playback.

When using the AV Foundation framework for recording or playback, you can respond to interruptions at the individual recorder or player level. To do this, create audio recorder or audio player delegates using the protocols described in AVAudioRecorderDelegate Protocol Reference and AVAudioPlayerDelegate Protocol Reference.

Tasks

Delegate Methods

Instance Methods

beginInterruption

Called after your audio session is interrupted.

- (void)beginInterruption

Availability
  • Available in iPhone OS 3.0 and later.
Declared In
AVAudioSession.h

categoryChanged:

Called after the audio session category changes.

- (void)categoryChanged:(NSString*)category

Parameters
category

The new audio session category.

Availability
  • Available in iPhone OS 3.0 and later.
Declared In
AVAudioSession.h

currentHardwareInputNumberOfChannelsChanged:

Called after the audio hardware input channel count changes.

- (void)currentHardwareInputNumberOfChannelsChanged:(NSInteger)numberOfChannels

Parameters
numberOfChannels

The new number audio hardware input channels.

Availability
  • Available in iPhone OS 3.0 and later.
Declared In
AVAudioSession.h

currentHardwareOutputNumberOfChannelsChanged:

Called after the audio hardware output channel count changes.

- (void)currentHardwareOutputNumberOfChannelsChanged:(NSInteger)numberOfChannels

Parameters
numberOfChannels

The new number of audio hardware output channels.

Availability
  • Available in iPhone OS 3.0 and later.
Declared In
AVAudioSession.h

currentHardwareSampleRateChanged:

Called after the audio hardware sample rate changes.

- (void)currentHardwareSampleRateChanged:(double)sampleRate

Parameters
sampleRate

The new audio hardware sample rate.

Availability
  • Available in iPhone OS 3.0 and later.
Declared In
AVAudioSession.h

endInterruption

Called after your audio session interruption has ended.

- (void)endInterruption

Availability
  • Available in iPhone OS 3.0 and later.
Declared In
AVAudioSession.h

inputIsAvailableChanged:

Called after the availability of audio input changes on a device.

- (void)inputIsAvailableChanged:(BOOL)isInputAvailable

Parameters
isInputAvailable

YES if audio input is now available, or NO if it is not.

Availability
  • Available in iPhone OS 3.0 and later.
Declared In
AVAudioSession.h


Last updated: 2009-11-17

Did this document help you? Yes It's good, but... Not helpful...