From d7086030fcf731e4bcef6c033cc6418cd04e6b91 Mon Sep 17 00:00:00 2001 From: Jean-Michel Trivi Date: Wed, 10 Oct 2012 12:11:16 -0700 Subject: Support querying active record sources Add support for querying whether there is currently a recording underway from the specified audio source. Bug 7314859 Change-Id: I986b231a10ffd368b08ec2f9c7f348d28eaeb892 --- include/media/AudioSystem.h | 2 ++ include/media/IAudioPolicyService.h | 1 + 2 files changed, 3 insertions(+) (limited to 'include') diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h index da4645a..49e1afc 100644 --- a/include/media/AudioSystem.h +++ b/include/media/AudioSystem.h @@ -70,6 +70,8 @@ public: // returns true in *state if tracks are active on the specified stream or has been active // in the past inPastMs milliseconds static status_t isStreamActive(audio_stream_type_t stream, bool *state, uint32_t inPastMs = 0); + // returns true in *state if a recorder is currently recording with the specified source + static status_t isSourceActive(audio_source_t source, bool *state); // set/get audio hardware parameters. The function accepts a list of parameters // key value pairs in the form: key1=value1;key2=value2;... diff --git a/include/media/IAudioPolicyService.h b/include/media/IAudioPolicyService.h index fb556af..cc2e069 100644 --- a/include/media/IAudioPolicyService.h +++ b/include/media/IAudioPolicyService.h @@ -88,6 +88,7 @@ public: virtual status_t unregisterEffect(int id) = 0; virtual status_t setEffectEnabled(int id, bool enabled) = 0; virtual bool isStreamActive(audio_stream_type_t stream, uint32_t inPastMs = 0) const = 0; + virtual bool isSourceActive(audio_source_t source) const = 0; virtual status_t queryDefaultPreProcessing(int audioSession, effect_descriptor_t *descriptors, uint32_t *count) = 0; -- cgit v1.1