Language

AudioFormat.Builder.SetChannelMask(ChannelOut) Method

Definition

Sets the channel position mask.

[Android.Runtime.Register("setChannelMask", "(I)Landroid/media/AudioFormat$Builder;", "GetSetChannelMask_IHandler")]
public virtual Android.Media.AudioFormat.Builder SetChannelMask(Android.Media.ChannelOut channelMask);
[<Android.Runtime.Register("setChannelMask", "(I)Landroid/media/AudioFormat$Builder;", "GetSetChannelMask_IHandler")>]
abstract member SetChannelMask : Android.Media.ChannelOut -> Android.Media.AudioFormat.Builder
override this.SetChannelMask : Android.Media.ChannelOut -> Android.Media.AudioFormat.Builder

Parameters

channelMask
ChannelOut

Describes the configuration of the audio channels. For output, this can be an OR-ed combination of channel position masks, such as FrontLeft, FrontRight, FrontCenter, LowFrequency, BackLeft, BackRight, BackCenter, SideLeft, and SideRight. For AudioTrack, some multichannel masks require matched left/right channel pairs. For input or AudioRecord, cast Mono or Stereo to ChannelOut. Mono is guaranteed to work on all devices.

Returns

the same Builder instance. This value cannot be null.

Attributes

Remarks

Sets the channel position mask. The channel position mask specifies the association between audio samples in a frame with named endpoint channels. The samples in the frame correspond to the named set bits in the channel position mask, in ascending bit order. See setChannelIndexMask(int) to specify channels based on endpoint numbered channels. This description of channel position masks covers the concept in more details.

Android reference for android.media.AudioFormat.Builder.setChannelMask.

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