diff options
author | Glenn Kasten <gkasten@google.com> | 2012-09-14 08:48:47 -0700 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2012-09-17 08:54:11 -0700 |
commit | 228c9847a31b79f8baa80302731cdbf6a2b3c0d4 (patch) | |
tree | 439f7bef38208e80c85cc9eadd8b0d1c23ef8744 /media | |
parent | d65afc65ea5b2bf83889dd88a9c94f895da8aece (diff) | |
download | frameworks_base-228c9847a31b79f8baa80302731cdbf6a2b3c0d4.zip frameworks_base-228c9847a31b79f8baa80302731cdbf6a2b3c0d4.tar.gz frameworks_base-228c9847a31b79f8baa80302731cdbf6a2b3c0d4.tar.bz2 |
New API for querying audio properties
Bug: 6635041
Change-Id: I66e87c75af7c84cdb23cb25a958e79bba8e53baa
Diffstat (limited to 'media')
-rw-r--r-- | media/java/android/media/AudioManager.java | 29 |
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; + } + } |