AudioToolbox.AudioSession Class
Interface to to control the audio context of your application

See Also: AudioSession Members

Syntax

[ObjCRuntime.Availability(Deprecated=ObjCRuntime.Platform.iOS_7_0, Message="Use AVAudioSession instead")]
public static class AudioSession

Remarks

Both the AVFoundation.AudioSession and AVFoundation.AVAudioSession reference the same underlying singleton object. Properties in AVFoundation.AudioSession were deprecated in iOS 7.0, and AVFoundation.AVAudioSession appears to be the preferred path forward.

You use the various AudioSession methods to control how the input and output are handled by the operating system, configure the recorder and speakers, control where the audio is played to, and where the audio is recorded from. AudioSession also provides a mechanism to start and stop using the audio system and to monitor changes to the audio system.

Both the initialization sequence and the use of some properties on AudioSession can throw an AudioToolbox.AudioSessionException.

Your application can use the AudioSession.AddListener(AudioSessionProperty, AudioToolbox.AudioSession.PropertyListener) method with the AudioInputAvailable value to monitor when the microphone becomes available.

Related content

Requirements

Namespace: AudioToolbox
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0