summaryrefslogtreecommitdiff
path: root/media/libmedia/AudioTrack.cpp
diff options
context:
space:
mode:
author Eric Laurent <elaurent@google.com> 2011-08-30 10:51:54 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2011-08-30 10:51:54 -0700
commit0e35c78d25a8df8b3bde566ad6c474f9df242ea4 (patch)
tree257814957ad7bdfc43cb5527c4a22e9e25b88d6f /media/libmedia/AudioTrack.cpp
parentd0116b680a2c194eb3b8713a230151bfb32a6aef (diff)
parent05ce0941649c3cdd7f8034496719e607977fc005 (diff)
Merge "226483: A2DP connected, but music out to speaker"
Diffstat (limited to 'media/libmedia/AudioTrack.cpp')
-rw-r--r--media/libmedia/AudioTrack.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index cecedb517d64..3b6c64d5fb51 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -1164,6 +1164,10 @@ status_t AudioTrack::restoreTrack_l(audio_track_cblk_t*& cblk, bool fromStart)
cblk->cv.broadcast();
cblk->lock.unlock();
+ // refresh the audio configuration cache in this process to make sure we get new
+ // output parameters in getOutput_l() and createTrack_l()
+ AudioSystem::clearAudioConfigCache();
+
// if the new IAudioTrack is created, createTrack_l() will modify the
// following member variables: mAudioTrack, mCblkMemory and mCblk.
// It will also delete the strong references on previous IAudioTrack and IMemory