summaryrefslogtreecommitdiffstats
path: root/media/java
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-09-19 11:13:58 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-09-19 11:13:58 -0700
commit549be8beadf5ad2a56b7f4269d419753c0d61be8 (patch)
treece9ce20a378cc9980057f4cdb5b17f68f726d7e7 /media/java
parent7b6ec1f6fd4f2858063d2d441b6118ac22da5569 (diff)
parent228c9847a31b79f8baa80302731cdbf6a2b3c0d4 (diff)
downloadframeworks_base-549be8beadf5ad2a56b7f4269d419753c0d61be8.zip
frameworks_base-549be8beadf5ad2a56b7f4269d419753c0d61be8.tar.gz
frameworks_base-549be8beadf5ad2a56b7f4269d419753c0d61be8.tar.bz2
Merge "New API for querying audio properties" into jb-mr1-dev
Diffstat (limited to 'media/java')
-rw-r--r--media/java/android/media/AudioManager.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java
index ea00ec8..c848f0f 100644
--- a/media/java/android/media/AudioManager.java
+++ b/media/java/android/media/AudioManager.java
@@ -2443,4 +2443,33 @@ public class AudioManager {
return null;
}
}
+
+ /**
+ * Used as a key for #getProperty to request the native or optimal output sample rate for
+ * this device, in decimal Hz.
+ * {@hide}
+ */
+ public static final String PROPERTY_OUTPUT_SAMPLE_RATE =
+ "android.media.property.OUTPUT_SAMPLE_RATE";
+
+ /**
+ * Used as a key for #getProperty to request the native or optimal output buffer size for
+ * this device, in decimal PCM frames.
+ * {@hide}
+ */
+ public static final String PROPERTY_OUTPUT_FRAMES_PER_BUFFER =
+ "android.media.property.OUTPUT_FRAMES_PER_BUFFER";
+
+ /**
+ * @param key One of the strings corresponding to a property key: either
+ * #PROPERTY_OUTPUT_SAMPLE_RATE or #PROPERTY_OUTPUT_FRAMES_PER_BUFFER
+ * @return A string representing the associated value for that property key,
+ * or null if there is no value for that key.
+ * {@hide}
+ */
+ public String getProperty(String key) {
+ // uses android.os.SystemProperties.get for selected keys, with suitable defaults
+ return null;
+ }
+
}