Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88353459 authored by Phil Burk's avatar Phil Burk Committed by Android (Google) Code Review
Browse files

Merge "AudioTrack: docs for getUnderrunCount()" into nyc-dev

parents 0ce76e92 2bf39d8e
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -1214,13 +1214,12 @@ public class AudioTrack implements AudioRouting
     * 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.
     * <p>
     * Underruns are less likely when buffer sizes are large.
     * <p> Though the "int" type is signed 32-bits, the value should be reinterpreted
     * as if it is unsigned 32-bits.
     * That is, the next position after 0x7FFFFFFF is (int) 0x80000000.
     * This is a continuously advancing counter. It can wrap around to zero
     * if there are too many underruns. If there were, for example, 68 underruns per
     * second then the counter would wrap in 2 years.
     * It may be possible to eliminate underruns by recreating the AudioTrack with
     * a larger buffer.
     * Or by using {@link #setBufferSizeInFrames(int)} to dynamically increase the
     * effective size of the buffer.
     */
    public int getUnderrunCount() {
        return native_get_underrun_count();