Freigeben über


AudioTrack.BufferCapacityInFrames Property

Definition

Returns the maximum size of the AudioTrack buffer in frames.

public virtual int BufferCapacityInFrames { [Android.Runtime.Register("getBufferCapacityInFrames", "()I", "GetGetBufferCapacityInFramesHandler", ApiSince=24)] get; }
[<get: Android.Runtime.Register("getBufferCapacityInFrames", "()I", "GetGetBufferCapacityInFramesHandler", ApiSince=24)>]
member this.BufferCapacityInFrames : int

Property Value

maximum size in frames of the AudioTrack buffer.

Attributes

Remarks

Returns the maximum size of the AudioTrack buffer in frames.

If the track's creation mode is #MODE_STATIC, it is equal to the specified bufferSizeInBytes on construction, converted to frame units. A static track's frame count will not change.

If the track's creation mode is #MODE_STREAM, it is greater than or equal to the specified bufferSizeInBytes converted to frame units. For streaming tracks, this value may be rounded up to a larger value if needed by the target output sink, and if the track is subsequently routed to a different output sink, the frame count 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.getBufferCapacityInFrames().

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