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

This commit is contained in:
Phil Burk
2016-03-01 19:13:38 +00:00
committed by Android (Google) Code Review

View File

@@ -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();