Freigeben über


AudioTrack.BufferSizeInFrames Property

Definition

Returns the effective size of the AudioTrack buffer that the application writes to.

public virtual int BufferSizeInFrames { [Android.Runtime.Register("getBufferSizeInFrames", "()I", "GetGetBufferSizeInFramesHandler", ApiSince=23)] get; }
[<get: Android.Runtime.Register("getBufferSizeInFrames", "()I", "GetGetBufferSizeInFramesHandler", ApiSince=23)>]
member this.BufferSizeInFrames : int

Property Value

current size in frames of the AudioTrack buffer.

Attributes

Remarks

Returns the effective size of the AudioTrack buffer that the application writes to.

This will be less than or equal to the result of #getBufferCapacityInFrames(). It will be equal if #setBufferSizeInFrames(int) has never been called.

If the track is subsequently routed to a different output sink, the buffer size and capacity may enlarge to accommodate.

If the AudioTrack encoding indicates compressed data, e.g. AudioFormat#ENCODING_AC3, then the frame count returned is the size of the AudioTrack buffer in bytes.

See also AudioManager#getProperty(String) for key AudioManager#PROPERTY_OUTPUT_FRAMES_PER_BUFFER.

Java documentation for android.media.AudioTrack.getBufferSizeInFrames().

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