From cc0f1cfb69ce8b8985fc2c0984847a06a13ad22d Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Mon, 24 Sep 2012 11:27:18 -0700 Subject: Implement android.media.AudioManager.getProperty() Bug: 6635041 Change-Id: I3386a4a6c226bc4eceaf65556119e4fb15f73224 --- media/libmedia/AudioSystem.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'media/libmedia/AudioSystem.cpp') diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp index 6e0c620..5624df4 100644 --- a/media/libmedia/AudioSystem.cpp +++ b/media/libmedia/AudioSystem.cpp @@ -735,6 +735,19 @@ status_t AudioSystem::isStreamActive(audio_stream_type_t stream, bool* state, ui return NO_ERROR; } +int32_t AudioSystem::getPrimaryOutputSamplingRate() +{ + const sp& af = AudioSystem::get_audio_flinger(); + if (af == 0) return 0; + return af->getPrimaryOutputSamplingRate(); +} + +int32_t AudioSystem::getPrimaryOutputFrameCount() +{ + const sp& af = AudioSystem::get_audio_flinger(); + if (af == 0) return 0; + return af->getPrimaryOutputFrameCount(); +} void AudioSystem::clearAudioConfigCache() { -- cgit v1.1