summaryrefslogtreecommitdiffstats
path: root/media/libmedia/AudioSystem.cpp
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-09-24 11:27:18 -0700
committerGlenn Kasten <gkasten@google.com>2012-09-25 17:13:18 -0700
commitcc0f1cfb69ce8b8985fc2c0984847a06a13ad22d (patch)
treef3522fd1ad371d1e592c8c8cfd8d0ce1d98f80c2 /media/libmedia/AudioSystem.cpp
parentd9aa7b4db46bea5966401f9fcfbecb3269ec55c7 (diff)
downloadframeworks_av-cc0f1cfb69ce8b8985fc2c0984847a06a13ad22d.zip
frameworks_av-cc0f1cfb69ce8b8985fc2c0984847a06a13ad22d.tar.gz
frameworks_av-cc0f1cfb69ce8b8985fc2c0984847a06a13ad22d.tar.bz2
Implement android.media.AudioManager.getProperty()
Bug: 6635041 Change-Id: I3386a4a6c226bc4eceaf65556119e4fb15f73224
Diffstat (limited to 'media/libmedia/AudioSystem.cpp')
-rw-r--r--media/libmedia/AudioSystem.cpp13
1 files changed, 13 insertions, 0 deletions
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<IAudioFlinger>& af = AudioSystem::get_audio_flinger();
+ if (af == 0) return 0;
+ return af->getPrimaryOutputSamplingRate();
+}
+
+int32_t AudioSystem::getPrimaryOutputFrameCount()
+{
+ const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger();
+ if (af == 0) return 0;
+ return af->getPrimaryOutputFrameCount();
+}
void AudioSystem::clearAudioConfigCache()
{