다음을 통해 공유


IAudioRouting.SetPreferredDevice(AudioDeviceInfo) Method

Definition

Specifies an audio device (via an AudioDeviceInfo object) to route the output/input to/from.

[Android.Runtime.Register("setPreferredDevice", "(Landroid/media/AudioDeviceInfo;)Z", "GetSetPreferredDevice_Landroid_media_AudioDeviceInfo_Handler:Android.Media.IAudioRoutingInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=24)]
public bool SetPreferredDevice (Android.Media.AudioDeviceInfo? deviceInfo);
[<Android.Runtime.Register("setPreferredDevice", "(Landroid/media/AudioDeviceInfo;)Z", "GetSetPreferredDevice_Landroid_media_AudioDeviceInfo_Handler:Android.Media.IAudioRoutingInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=24)>]
abstract member SetPreferredDevice : Android.Media.AudioDeviceInfo -> bool

Parameters

deviceInfo
AudioDeviceInfo

The AudioDeviceInfo specifying the audio sink or source. If deviceInfo is null, default routing is restored.

Returns

true if succesful, false if the specified AudioDeviceInfo is non-null and does not correspond to a valid audio device.

Attributes

Remarks

Specifies an audio device (via an AudioDeviceInfo object) to route the output/input to/from.

Java documentation for android.media.AudioRouting.setPreferredDevice(android.media.AudioDeviceInfo).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to