AudioFormat.Builder.SetChannelMask(ChannelOut) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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, the channelMask can be an OR-ed combination of channel position masks, e.g. AudioFormat.CHANNEL_OUT_FRONT_LEFT, AudioFormat.CHANNEL_OUT_FRONT_RIGHT, AudioFormat.CHANNEL_OUT_FRONT_CENTER, AudioFormat.CHANNEL_OUT_LOW_FREQUENCY AudioFormat.CHANNEL_OUT_BACK_LEFT, AudioFormat.CHANNEL_OUT_BACK_RIGHT, AudioFormat.CHANNEL_OUT_BACK_CENTER, AudioFormat.CHANNEL_OUT_SIDE_LEFT, AudioFormat.CHANNEL_OUT_SIDE_RIGHT. For output or AudioTrack, channel position masks which do not contain matched left/right pairs are invalid. For input or AudioRecord, the mask should be AudioFormat.CHANNEL_IN_MONO or AudioFormat.CHANNEL_IN_STEREO. AudioFormat.CHANNEL_IN_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.