diff options
Diffstat (limited to 'services/audiopolicy/service/AudioPolicyEffects.h')
-rw-r--r-- | services/audiopolicy/service/AudioPolicyEffects.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/services/audiopolicy/service/AudioPolicyEffects.h b/services/audiopolicy/service/AudioPolicyEffects.h index 3dec437..1c251e0 100644 --- a/services/audiopolicy/service/AudioPolicyEffects.h +++ b/services/audiopolicy/service/AudioPolicyEffects.h @@ -27,8 +27,12 @@ #include <utils/Vector.h> #include <utils/SortedVector.h> +#include <media/stagefright/foundation/ADebug.h> + namespace android { +class AudioPolicyService; + // ---------------------------------------------------------------------------- // AudioPolicyEffects class @@ -42,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 @@ -82,6 +86,12 @@ public: audio_stream_type_t stream, int audioSession); + status_t doAddOutputSessionEffects(audio_io_handle_t output, + audio_stream_type_t stream, + int audioSession, + audio_output_flags_t flags = AUDIO_OUTPUT_FLAG_NONE, + audio_channel_mask_t channelMask = 0, uid_t uid = 0); + private: // class to store the description of an effects and its parameters @@ -102,6 +112,7 @@ private: ((origParam->psize + 3) & ~3) + ((origParam->vsize + 3) & ~3); effect_param_t *dupParam = (effect_param_t *) malloc(origSize); + CHECK(dupParam != NULL); memcpy(dupParam, origParam, origSize); // This works because the param buffer allocation is also done by // multiples of 4 bytes originally. In theory we should memcpy only @@ -189,6 +200,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 |