From 0d5bbc4a31d0692da26222cbe204df12e6986bdd Mon Sep 17 00:00:00 2001 From: Dorin Drimus Date: Tue, 6 Jul 2021 16:57:37 +0200 Subject: [PATCH] Document change of allow setBufferSize for non pcm AudioTrack Functional code change is in AudioTrack.cpp, this is just an update to the developer documentation. Test: N/A Bug: 192343963 Change-Id: I0b41b31168eff51f587e7678d86e1ea61603b079 --- media/java/android/media/AudioTrack.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/media/java/android/media/AudioTrack.java b/media/java/android/media/AudioTrack.java index 23d9532e11a0b..8822aeac80e4d 100644 --- a/media/java/android/media/AudioTrack.java +++ b/media/java/android/media/AudioTrack.java @@ -2082,8 +2082,9 @@ public class AudioTrack extends PlayerBase * It may also be adjusted slightly for internal reasons. * If bufferSizeInFrames is less than zero then {@link #ERROR_BAD_VALUE} * will be returned. - *

This method is only supported for PCM audio. - * It is not supported for compressed audio tracks. + *

This method is supported for PCM audio at all API levels. + * Compressed audio is supported in API levels 33 and above. + * For compressed streams the size of a frame is considered to be exactly one byte. * * @param bufferSizeInFrames requested buffer size in frames * @return the actual buffer size in frames or an error code,