summaryrefslogtreecommitdiffstats
path: root/media/libmedia/AudioSystem.cpp
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2011-08-02 13:33:41 -0700
committerMarco Nelissen <marcone@google.com>2011-08-09 10:21:10 -0700
commit3a34befc6fb04a4945a849e8bda8b84e4bf973fe (patch)
tree80dee67385fb78763b2c25f6dce9ed122bfd9aee /media/libmedia/AudioSystem.cpp
parenta1f10e8959cd4656aedb2613e855342102e59555 (diff)
downloadframeworks_av-3a34befc6fb04a4945a849e8bda8b84e4bf973fe.zip
frameworks_av-3a34befc6fb04a4945a849e8bda8b84e4bf973fe.tar.gz
frameworks_av-3a34befc6fb04a4945a849e8bda8b84e4bf973fe.tar.bz2
Keep effects sessions active when the caller dies.
Don't remove effects until the session they are in goes away or all AudioEffects have been explicitly released. This allows the control panel process to die without stopping the effects. Change-Id: I4496e5df080230ca1af149dec95c1309ab8ea888
Diffstat (limited to 'media/libmedia/AudioSystem.cpp')
-rw-r--r--media/libmedia/AudioSystem.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp
index 5009957..b26ed71 100644
--- a/media/libmedia/AudioSystem.cpp
+++ b/media/libmedia/AudioSystem.cpp
@@ -356,6 +356,20 @@ int AudioSystem::newAudioSessionId() {
return af->newAudioSessionId();
}
+void AudioSystem::acquireAudioSessionId(int audioSession) {
+ const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger();
+ if (af != 0) {
+ af->acquireAudioSessionId(audioSession);
+ }
+}
+
+void AudioSystem::releaseAudioSessionId(int audioSession) {
+ const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger();
+ if (af != 0) {
+ af->releaseAudioSessionId(audioSession);
+ }
+}
+
// ---------------------------------------------------------------------------
void AudioSystem::AudioFlingerClient::binderDied(const wp<IBinder>& who) {