AudioTrack: Fix track creation of 9.1.4 and 9.1.6 streams

Required support if the platform supports 14 or 16
channels internally, otherwise CTS test fails.

Test: atest AudioTrackTest#testImmersiveAudio
Bug: 202162797
Change-Id: I052f2e38a27a63e5304b7fb6bffaaabe37efa8eb
This commit is contained in:
Andy Hung
2021-10-06 17:28:00 -07:00
parent 11cffc874d
commit a9f98ae11a

View File

@@ -1613,7 +1613,9 @@ public class AudioTrack extends PlayerBase
AudioFormat.CHANNEL_OUT_BOTTOM_FRONT_LEFT |
AudioFormat.CHANNEL_OUT_BOTTOM_FRONT_CENTER |
AudioFormat.CHANNEL_OUT_BOTTOM_FRONT_RIGHT |
AudioFormat.CHANNEL_OUT_LOW_FREQUENCY_2;
AudioFormat.CHANNEL_OUT_LOW_FREQUENCY_2 |
AudioFormat.CHANNEL_OUT_FRONT_WIDE_LEFT |
AudioFormat.CHANNEL_OUT_FRONT_WIDE_RIGHT;
// Returns a boolean whether the attributes, format, bufferSizeInBytes, mode allow
// power saving to be automatically enabled for an AudioTrack. Returns false if
@@ -1787,6 +1789,8 @@ public class AudioTrack extends PlayerBase
| AudioFormat.CHANNEL_OUT_TOP_SIDE_RIGHT);
put("bottom front", AudioFormat.CHANNEL_OUT_BOTTOM_FRONT_LEFT
| AudioFormat.CHANNEL_OUT_BOTTOM_FRONT_RIGHT);
put("front wide", AudioFormat.CHANNEL_OUT_FRONT_WIDE_LEFT
| AudioFormat.CHANNEL_OUT_FRONT_WIDE_RIGHT);
}};
/**