Compartir a través de


AudioTrack.UnderrunCount Property

Definition

Returns the number of underrun occurrences in the application-level write buffer since the AudioTrack was created.

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

Property Value

Attributes

Remarks

Returns the number of underrun occurrences in the application-level write buffer since the AudioTrack was created. An underrun occurs if the application does not write audio data quickly enough, causing the buffer to underflow and a potential audio glitch or pop.

Underruns are less likely when buffer sizes are large. It may be possible to eliminate underruns by recreating the AudioTrack with a larger buffer. Or by using #setBufferSizeInFrames(int) to dynamically increase the effective size of the buffer.

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

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