diff options
author | Glenn Kasten <gkasten@google.com> | 2014-12-05 21:00:03 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-12-05 21:00:04 +0000 |
commit | 57216ca41b2d7e35bda01ce910ae6e72ed01bfae (patch) | |
tree | ea084b4e5befb3ba62cb18234279df7fd3fcb73f | |
parent | 597ce69a77636eab073fc83ded01e8af51e887e2 (diff) | |
parent | be837c328ae1ea2b193d05aaa3d4214c263b5b77 (diff) | |
download | frameworks_av-57216ca41b2d7e35bda01ce910ae6e72ed01bfae.zip frameworks_av-57216ca41b2d7e35bda01ce910ae6e72ed01bfae.tar.gz frameworks_av-57216ca41b2d7e35bda01ce910ae6e72ed01bfae.tar.bz2 |
Merge "Track volume should be maintained even if track is restored" into lmp-mr1-dev
-rw-r--r-- | media/libmedia/AudioTrack.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index 4a6df6d..e4c3c08 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -1226,7 +1226,11 @@ status_t AudioTrack::createTrack_l() mStaticProxy = new StaticAudioTrackClientProxy(cblk, buffers, frameCount, mFrameSizeAF); mProxy = mStaticProxy; } - mProxy->setVolumeLR(GAIN_MINIFLOAT_PACKED_UNITY); + + mProxy->setVolumeLR(gain_minifloat_pack( + gain_from_float(mVolume[AUDIO_INTERLEAVE_LEFT]), + gain_from_float(mVolume[AUDIO_INTERLEAVE_RIGHT]))); + mProxy->setSendLevel(mSendLevel); mProxy->setSampleRate(mSampleRate); mProxy->setMinimum(mNotificationFramesAct); |