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

Commit 2bf39d8e authored by Phil Burk's avatar Phil Burk
Browse files

AudioTrack: docs for getUnderrunCount()



Remove unnecessary warning about underruns.

Bug: 27384290
Change-Id: Ia872a6580d50952195842c3251370a3dd5da5111
Signed-off-by: default avatarPhil Burk <philburk@google.com>
parent 51605275
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -1190,13 +1190,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();