Implement android.media.AudioManager.getProperty()
Bug: 6635041
Change-Id: I3386a4a6c226bc4eceaf65556119e4fb15f73224
diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h
index 932482b..da4645a 100644
--- a/include/media/AudioSystem.h
+++ b/include/media/AudioSystem.h
@@ -234,6 +234,10 @@
static const sp<IAudioPolicyService>& get_audio_policy_service();
+ // helpers for android.media.AudioManager.getProperty(), see description there for meaning
+ static int32_t getPrimaryOutputSamplingRate();
+ static int32_t getPrimaryOutputFrameCount();
+
// ----------------------------------------------------------------------------
private:
diff --git a/include/media/IAudioFlinger.h b/include/media/IAudioFlinger.h
index bdd0142..5170a87 100644
--- a/include/media/IAudioFlinger.h
+++ b/include/media/IAudioFlinger.h
@@ -187,6 +187,13 @@
audio_io_handle_t dstOutput) = 0;
virtual audio_module_handle_t loadHwModule(const char *name) = 0;
+
+ // helpers for android.media.AudioManager.getProperty(), see description there for meaning
+ // FIXME move these APIs to AudioPolicy to permit a more accurate implementation
+ // that looks on primary device for a stream with fast flag, primary flag, or first one.
+ virtual int32_t getPrimaryOutputSamplingRate() = 0;
+ virtual int32_t getPrimaryOutputFrameCount() = 0;
+
};