summaryrefslogtreecommitdiffstats
path: root/media/libmedia
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2009-08-27 00:48:47 -0700
committerEric Laurent <elaurent@google.com>2009-08-27 05:58:10 -0700
commita9c322e398a1f5fdcace3b8b73967f010b1c31ca (patch)
tree1b70ba17a1eb2df81c32928ff9ba31cb3d916597 /media/libmedia
parent0c89199745bc1bf05b997fc7c342017807676b6f (diff)
downloadframeworks_av-a9c322e398a1f5fdcace3b8b73967f010b1c31ca.zip
frameworks_av-a9c322e398a1f5fdcace3b8b73967f010b1c31ca.tar.gz
frameworks_av-a9c322e398a1f5fdcace3b8b73967f010b1c31ca.tar.bz2
Fix issue 2045911: Camera Shutter tone does not play correctly while listening to music.
Add the possibility to delay routing and volume commands in AudioPolicyClientInterface. The delay is not blocking for the caller.
Diffstat (limited to 'media/libmedia')
-rw-r--r--media/libmedia/AudioSystem.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp
index 98b55e9..bd1b2d7 100644
--- a/media/libmedia/AudioSystem.cpp
+++ b/media/libmedia/AudioSystem.cpp
@@ -883,5 +883,15 @@ status_t AudioParameter::getFloat(const String8& key, float& value)
return result;
}
+status_t AudioParameter::getAt(size_t index, String8& key, String8& value)
+{
+ if (mParameters.size() > index) {
+ key = mParameters.keyAt(index);
+ value = mParameters.valueAt(index);
+ return NO_ERROR;
+ } else {
+ return BAD_VALUE;
+ }
+}
}; // namespace android