summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Paul Mclean <pmclean@google.com> 2015-08-05 21:10:37 +0000
committer Android Git Automerger <android-git-automerger@android.com> 2015-08-05 21:10:37 +0000
commit29e678b9c77fa75232b4b9e147430a920e6f6cc4 (patch)
tree2ed609686cee2e2917cb8604bae977c99f7cbbb9
parent8d5e35ad8129e19b64bf1ecbe58764863fb4633c (diff)
parenteda52f0a8e08d100daadddc4c875ebd7d25fa72f (diff)
am eda52f0a: am 4d1128b2: am 8eaf18b0: Merge "Documenting behavior of returning a 0-length array for formats, channels, rates queries for analog devices." into mnc-dev
* commit 'eda52f0a8e08d100daadddc4c875ebd7d25fa72f': Documenting behavior of returning a 0-length array for formats, channels, rates queries for analog devices.
-rw-r--r--media/java/android/media/AudioDeviceInfo.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/media/java/android/media/AudioDeviceInfo.java b/media/java/android/media/AudioDeviceInfo.java
index bdb1f58e8b89..61042646eeab 100644
--- a/media/java/android/media/AudioDeviceInfo.java
+++ b/media/java/android/media/AudioDeviceInfo.java
@@ -156,6 +156,8 @@ public final class AudioDeviceInfo {
/**
* @return An array of sample rates supported by the audio device.
+ *
+ * Note: an empty array indicates that the device supports arbitrary rates.
*/
public @NonNull int[] getSampleRates() {
return mPort.samplingRates();
@@ -166,6 +168,8 @@ public final class AudioDeviceInfo {
* {@link AudioFormat#CHANNEL_OUT_7POINT1}) for which this audio device can be configured.
*
* @see AudioFormat
+ *
+ * Note: an empty array indicates that the device supports arbitrary channel masks.
*/
public @NonNull int[] getChannelMasks() {
return mPort.channelMasks();
@@ -175,6 +179,8 @@ public final class AudioDeviceInfo {
* @return An array of channel index masks for which this audio device can be configured.
*
* @see AudioFormat
+ *
+ * Note: an empty array indicates that the device supports arbitrary channel index masks.
*/
public @NonNull int[] getChannelIndexMasks() {
return mPort.channelIndexMasks();
@@ -183,6 +189,8 @@ public final class AudioDeviceInfo {
/**
* @return An array of channel counts (1, 2, 4, ...) for which this audio device
* can be configured.
+ *
+ * Note: an empty array indicates that the device supports arbitrary channel counts.
*/
public @NonNull int[] getChannelCounts() {
int[] masks = getChannelMasks();
@@ -205,6 +213,8 @@ public final class AudioDeviceInfo {
* integer precision to that device.
*
* @see AudioFormat
+ *
+ * Note: an empty array indicates that the device supports arbitrary encodings.
*/
public @NonNull int[] getEncodings() {
return AudioFormat.filterPublicFormats(mPort.formats());