diff options
| author | 2016-03-01 19:13:38 +0000 | |
|---|---|---|
| committer | 2016-03-01 19:13:39 +0000 | |
| commit | 88353459e28059d440d76d1e78fb6a2bce157fb3 (patch) | |
| tree | a6a9bc2c1910bdbbd6f836b1913913d2cd0ba2e9 | |
| parent | 0ce76e920492ce12226591cb0fd66527c7723eed (diff) | |
| parent | 2bf39d8e9f9bdcbe548f8bd8acb89def382b467d (diff) | |
Merge "AudioTrack: docs for getUnderrunCount()" into nyc-dev
| -rw-r--r-- | media/java/android/media/AudioTrack.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/media/java/android/media/AudioTrack.java b/media/java/android/media/AudioTrack.java index f02e8375f072..c48bfc532965 100644 --- a/media/java/android/media/AudioTrack.java +++ b/media/java/android/media/AudioTrack.java @@ -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(); |