From 929575cf803ad7c5661404d512dc6d77164f5ca6 Mon Sep 17 00:00:00 2001 From: Dorin Drimus Date: Tue, 10 May 2022 19:15:16 +0200 Subject: [PATCH] Add mention of start threashold in AudioTrack.play() Expand documentation for AudioTrack.play() to include get and set start threshold from Android S. Bug: 192920591 Test: N/A, only changes documentation Change-Id: Ibb4da2c3f5239b480c49e7bcbaae5b50ef5d01d3 --- media/java/android/media/AudioTrack.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/media/java/android/media/AudioTrack.java b/media/java/android/media/AudioTrack.java index 55c558f36880c..85cd342b5e11a 100644 --- a/media/java/android/media/AudioTrack.java +++ b/media/java/android/media/AudioTrack.java @@ -2910,6 +2910,10 @@ public class AudioTrack extends PlayerBase * For portability, an application should prime the data path to the maximum allowed * by writing data until the write() method returns a short transfer count. * This allows play() to start immediately, and reduces the chance of underrun. + *

+ * As of {@link android.os.Build.VERSION_CODES#S} the minimum level to start playing + * can be obtained using {@link #getStartThresholdInFrames()} and set with + * {@link #setStartThresholdInFrames(int)}. * * @throws IllegalStateException if the track isn't properly initialized */