Aracılığıyla paylaş


AudioFormat.FrameSizeInBytes Property

Definition

Return the frame size in bytes.

public virtual int FrameSizeInBytes { [Android.Runtime.Register("getFrameSizeInBytes", "()I", "GetGetFrameSizeInBytesHandler", ApiSince=29)] get; }
[<get: Android.Runtime.Register("getFrameSizeInBytes", "()I", "GetGetFrameSizeInBytesHandler", ApiSince=29)>]
member this.FrameSizeInBytes : int

Property Value

The audio frame size in bytes corresponding to the encoding and the channel mask.

Attributes

Remarks

Return the frame size in bytes.

For PCM or PCM packed compressed data this is the size of a sample multiplied by the channel count. For all other cases, including invalid/unset channel masks, this will return 1 byte. As an example, a stereo 16-bit PCM format would have a frame size of 4 bytes, an 8 channel float PCM format would have a frame size of 32 bytes, and a compressed data format (not packed in PCM) would have a frame size of 1 byte.

Both AudioRecord or AudioTrack process data in multiples of this frame size.

Java documentation for android.media.AudioFormat.getFrameSizeInBytes().

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