Protocol: AVAudioSessionDelegate
Overview
The use of this protocol is deprecated in iOS 6 and later. Instead, you should use the notifications declared in AVAudioSession Class Reference. Called after your audio session is interrupted. Called after your audio session interruption ends. Called after your audio session interruption ends, with flags indicating the state of the audio session.Called after the availability of audio input changes on a device.
Instance Method Summary (collapse)
-
- beginInterruption
Called after your audio session is interrupted.
-
- endInterruption
Called after your audio session interruption ends.
-
- endInterruptionWithFlags:
Called after your audio session interruption ends, with flags indicating the state of the audio session.
-
- inputIsAvailableChanged:
Called after the availability of audio input changes on a device.
Instance Method Details
- (Object) beginInterruption
Called after your audio session is interrupted. By the time this interruption arrives, your audio has already stopped. Your application may be suspended or terminated following an interruption—for example, if a user chooses to take an incoming phone call. Use this method to adjust the user interface, and to save application state, as necessary.
- (Object) endInterruption
Called after your audio session interruption ends. The endInterruptionWithFlags: method provides you with more information upon interruption end than this method does. Apple recommends that you use endInterruptionWithFlags: instead of this method.If you implement the endInterruptionWithFlags: method, that method is called instead of this one when an interruption ends.To resume using audio after an interruption ends, you must ensure that your audio session is active. AVAudioPlayer and AVAudioRecorder instances reactivate your audio session automatically when an interruption ends. If you are using another audio technology, such as OpenAL, audio units, or audio queues, you must reactivate your audio session yourself before you can again use audio.You can also use this method to update the user interface and application state, as necessary.
- (Object) endInterruptionWithFlags(flags)
Called after your audio session interruption ends, with flags indicating the state of the audio session. To resume using audio after an interruption ends, you must ensure that your audio session is active. AVAudioPlayer and AVAudioRecorder instances reactivate your audio session automatically when an interruption ends. If you are using another audio technology, such as OpenAL, audio units, or audio queues, you must reactivate your audio session yourself before you can again use audio.You can also use this method to update the user interface and application state, as necessary.If this delegate method receives the AVAudioSessionInterruptionFlags_ShouldResume constant in its flags parameter, the audio session is immediately ready to be used.If you implement this method, it is called instead of the endInterruption method when an interruption ends.
- (Object) inputIsAvailableChanged(isInputAvailable)
Called after the availability of audio input changes on a device.