AudioRoutingManager AudioRoutingManager AudioRoutingManager AudioRoutingManager Class

Definition

Provides functionality that lets Voice over IP applications route audio to endpoints other than the speakerphone.

public : sealed class AudioRoutingManager : IAudioRoutingManager
public sealed class AudioRoutingManager : IAudioRoutingManager
Public NotInheritable Class AudioRoutingManager Implements IAudioRoutingManager
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows Mobile Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Phone.PhoneContract (introduced v1)
Capabilities
ID_CAP_VOIP [Windows Phone]

Remarks

The APIs in the Windows.Phone.Media.Devices namespace require the ID_CAP_AUDIOROUTING capability.

Properties

AvailableAudioEndpoints AvailableAudioEndpoints AvailableAudioEndpoints AvailableAudioEndpoints

Gets the list of available audio routing endpoints.

public : AvailableAudioRoutingEndpoints AvailableAudioEndpoints { get; }
public AvailableAudioRoutingEndpoints AvailableAudioEndpoints { get; }
Public ReadOnly Property AvailableAudioEndpoints As AvailableAudioRoutingEndpoints
var availableAudioRoutingEndpoints = audioRoutingManager.availableAudioEndpoints;
Value
AvailableAudioRoutingEndpoints AvailableAudioRoutingEndpoints AvailableAudioRoutingEndpoints AvailableAudioRoutingEndpoints

The list of available audio routing endpoints. When multiple endpoints are available, values from the AvailableAudioRoutingEndpoints enumeration are combined using bitwise OR.

Additional features and requirements
Device family
Windows Mobile Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Phone.PhoneContract (introduced v1)
Capabilities
ID_CAP_VOIP [Windows Phone]

Methods

GetAudioEndpoint() GetAudioEndpoint() GetAudioEndpoint() GetAudioEndpoint()

Gets the audio endpoint currently in use.

public : AudioRoutingEndpoint GetAudioEndpoint()
public AudioRoutingEndpoint GetAudioEndpoint()
Public Function GetAudioEndpoint() As AudioRoutingEndpoint
var audioRoutingEndpoint = audioRoutingManager.getAudioEndpoint();
Returns
Additional features and requirements
Device family
Windows Mobile Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Phone.PhoneContract (introduced v1)
Capabilities
ID_CAP_VOIP [Windows Phone]

GetDefault() GetDefault() GetDefault() GetDefault()

Gets the default instance of the AudioRoutingManager class.

public : static AudioRoutingManager GetDefault()
public static AudioRoutingManager GetDefault()
Public Static Function GetDefault() As AudioRoutingManager
var audioRoutingManager = Windows.Phone.Media.Devices.AudioRoutingManager.getDefault();
Returns
Additional features and requirements
Device family
Windows Mobile Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Phone.PhoneContract (introduced v1)
Capabilities
ID_CAP_VOIP [Windows Phone]

SetAudioEndpoint(AudioRoutingEndpoint) SetAudioEndpoint(AudioRoutingEndpoint) SetAudioEndpoint(AudioRoutingEndpoint) SetAudioEndpoint(AudioRoutingEndpoint)

Requests a different audio endpoint.

public : void SetAudioEndpoint(AudioRoutingEndpoint endpoint)
public void SetAudioEndpoint(AudioRoutingEndpoint endpoint)
Public Function SetAudioEndpoint(endpoint As AudioRoutingEndpoint) As void
audioRoutingManager.setAudioEndpoint(endpoint);
Parameters
Additional features and requirements
Device family
Windows Mobile Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Phone.PhoneContract (introduced v1)
Capabilities
ID_CAP_VOIP [Windows Phone]

Remarks

Setting the audio endpoint will only succeed if you have an active communications-category audio stream in the system. Otherwise, it will fail.

Events

AudioEndpointChanged AudioEndpointChanged AudioEndpointChanged AudioEndpointChanged

Occurs when the audio endpoint currently in use has changed, or when the set of available audio endpoints has changed.

public : event TypedEventHandler AudioEndpointChanged<AudioRoutingManager, object>
public event TypedEventHandler AudioEndpointChanged<AudioRoutingManager, object>
Public Event TypedEventHandler AudioEndpointChanged( Of ( Of AudioRoutingManager ), ( Of object ))
function onAudioEndpointChanged(eventArgs){/* Your code */}


audioRoutingManager.addEventListener("audioEndpointChanged", onAudioEndpointChanged);
audioRoutingManager.removeEventListener("audioEndpointChanged", onAudioEndpointChanged);
Additional features and requirements
Device family
Windows Mobile Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Phone.PhoneContract (introduced v1)
Capabilities
ID_CAP_VOIP [Windows Phone]

Remarks

This event is raised even when the application itself has requested the change by calling SetAudioEndpoint.