OSDN Git Service

Fix issue 2045911: Camera Shutter tone does not play correctly while listening to...
authorEric Laurent <elaurent@google.com>
Thu, 27 Aug 2009 07:49:14 +0000 (00:49 -0700)
committerEric Laurent <elaurent@google.com>
Thu, 27 Aug 2009 12:51:04 +0000 (05:51 -0700)
Add the possibility to delay routing and volume commands in AudioPolicyClientInterface. The delay is not blocking for the caller.

include/hardware_legacy/AudioPolicyInterface.h

index 57a60ae..1a9aff5 100644 (file)
@@ -175,13 +175,13 @@ public:
 
     // set a stream volume for a particular output. For the same user setting, a given stream type can have different volumes
     // for each output (destination device) it is attached to.
-    virtual status_t setStreamVolume(AudioSystem::stream_type stream, float volume, audio_io_handle_t output) = 0;
+    virtual status_t setStreamVolume(AudioSystem::stream_type stream, float volume, audio_io_handle_t output, int delayMs = 0) = 0;
 
     // reroute a given stream type to the specified output
     virtual status_t setStreamOutput(AudioSystem::stream_type stream, audio_io_handle_t output) = 0;
 
     // function enabling to send proprietary informations directly from audio policy manager to audio hardware interface.
-    virtual void setParameters(audio_io_handle_t ioHandle, const String8& keyValuePairs) = 0;
+    virtual void setParameters(audio_io_handle_t ioHandle, const String8& keyValuePairs, int delayMs = 0) = 0;
     // function enabling to receive proprietary informations directly from audio hardware interface to audio policy manager.
     virtual String8 getParameters(audio_io_handle_t ioHandle, const String8& keys) = 0;