Udostępnij za pośrednictwem


Virtualizer.GetSpeakerAngles(ChannelIn, VirtualizationMode, Int32[]) Method

Definition

Queries the virtual speaker angles (azimuth and elevation) for a combination of a channel mask and virtualization mode.

[Android.Runtime.Register("getSpeakerAngles", "(II[I)Z", "GetGetSpeakerAngles_IIarrayIHandler")]
public virtual bool GetSpeakerAngles (Android.Media.ChannelIn inputChannelMask, Android.Media.Audiofx.VirtualizationMode virtualizationMode, int[]? angles);
[<Android.Runtime.Register("getSpeakerAngles", "(II[I)Z", "GetGetSpeakerAngles_IIarrayIHandler")>]
abstract member GetSpeakerAngles : Android.Media.ChannelIn * Android.Media.Audiofx.VirtualizationMode * int[] -> bool
override this.GetSpeakerAngles : Android.Media.ChannelIn * Android.Media.Audiofx.VirtualizationMode * int[] -> bool

Parameters

inputChannelMask
ChannelIn

the channel mask of the content to virtualize.

virtualizationMode
VirtualizationMode

the mode for which virtualization processing is to be performed, one of #VIRTUALIZATION_MODE_BINAURAL, #VIRTUALIZATION_MODE_TRANSAURAL.

angles
Int32[]

a non-null array whose length is 3 times the number of channels in the channel mask. If the method indicates the configuration is supported, the array will contain upon return triplets of values: for each channel i among the channels of the mask: <ul> <li>the element at index 3i in the array contains the speaker identification (e.g. AudioFormat#CHANNEL_OUT_FRONT_LEFT),</li> <li>the element at index 3i+1 contains its corresponding azimuth angle expressed in degrees, where 0 is the direction the listener faces, 180 is behind the listener, and -90 is to her/his left,</li> <li>the element at index 3*i+2 contains its corresponding elevation angle where +90 is directly above the listener, 0 is the horizontal plane, and -90 is directly below the listener.</li>

Returns

true if the combination of channel mask and virtualization mode is supported, false otherwise.

Attributes

Exceptions

Remarks

Queries the virtual speaker angles (azimuth and elevation) for a combination of a channel mask and virtualization mode. If the virtualization configuration (mask and mode) is supported (see #canVirtualize(int, int), the array angles will contain upon return the definition of each virtual speaker and its azimuth and elevation angles relative to the listener. <br>Note that in some virtualizer implementations, the angles may be strength-dependent.

Java documentation for android.media.audiofx.Virtualizer.getSpeakerAngles(int, int, int[]).

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