summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy/service/AudioPolicyEffects.h
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2016-01-14 02:46:40 -0800
committerSteve Kondik <shade@chemlab.org>2016-03-08 17:34:16 -0800
commit0479d7c79a7fd6f112e8dc7e45c009cf6602dbaa (patch)
tree6ad8d2cd4abd2f7f2fe6beb8348fd696426f76b2 /services/audiopolicy/service/AudioPolicyEffects.h
parent51aee1e55bee9cf8e4fd30ecf19fccd7ab7bfc15 (diff)
downloadframeworks_av-0479d7c79a7fd6f112e8dc7e45c009cf6602dbaa.zip
frameworks_av-0479d7c79a7fd6f112e8dc7e45c009cf6602dbaa.tar.gz
frameworks_av-0479d7c79a7fd6f112e8dc7e45c009cf6602dbaa.tar.bz2
audiopolicy: Add notification when default effects are updated
* In M, we now have the ability to define a default set of audio effect on a per-stream basis. This allows us to get around the problem of apps not sending the control intents so we can implement smart global effects for specific media types. * We still need a session id in order to get a handle and configure them from an app like AudioFX, so we'll need to add some plumbing in order to send an event to interested applications. * This patch implements the native side of this. The Java layer will call down thru AudioSystem and register a callback which will be invoked by the audio policy when default effects are updated on a stream. This callback will receive both the stream type as well as the session id. * Attaching this listener requires that the caller hold the MODIFY_AUDIO_ROUTING permission. Change-Id: I142b15f2585ffca6a953c3e828e2a7c07b24f56c
Diffstat (limited to 'services/audiopolicy/service/AudioPolicyEffects.h')
-rw-r--r--services/audiopolicy/service/AudioPolicyEffects.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/services/audiopolicy/service/AudioPolicyEffects.h b/services/audiopolicy/service/AudioPolicyEffects.h
index 3845050..2023784 100644
--- a/services/audiopolicy/service/AudioPolicyEffects.h
+++ b/services/audiopolicy/service/AudioPolicyEffects.h
@@ -31,6 +31,8 @@
namespace android {
+class AudioPolicyService;
+
// ----------------------------------------------------------------------------
// AudioPolicyEffects class
@@ -44,7 +46,7 @@ public:
// The constructor will parse audio_effects.conf
// First it will look whether vendor specific file exists,
// otherwise it will parse the system default file.
- AudioPolicyEffects();
+ AudioPolicyEffects(AudioPolicyService *audioPolicyService);
virtual ~AudioPolicyEffects();
// NOTE: methods on AudioPolicyEffects should never be called with the AudioPolicyService
@@ -192,6 +194,8 @@ private:
KeyedVector< audio_stream_type_t, EffectDescVector* > mOutputStreams;
// Automatic output effects are unique for audiosession ID
KeyedVector< int32_t, EffectVector* > mOutputSessions;
+
+ AudioPolicyService *mAudioPolicyService;
};
}; // namespace android