diff options
author | Glenn Kasten <gkasten@google.com> | 2014-12-05 21:07:22 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-12-05 21:07:22 +0000 |
commit | 41d8d8e79f41f1295c5763c4257bf7c743088678 (patch) | |
tree | ea084b4e5befb3ba62cb18234279df7fd3fcb73f | |
parent | 668b055081bb9d0d61775acf67bb27ce66b214f6 (diff) | |
parent | 57216ca41b2d7e35bda01ce910ae6e72ed01bfae (diff) | |
download | frameworks_av-41d8d8e79f41f1295c5763c4257bf7c743088678.zip frameworks_av-41d8d8e79f41f1295c5763c4257bf7c743088678.tar.gz frameworks_av-41d8d8e79f41f1295c5763c4257bf7c743088678.tar.bz2 |
am 57216ca4: Merge "Track volume should be maintained even if track is restored" into lmp-mr1-dev
* commit '57216ca41b2d7e35bda01ce910ae6e72ed01bfae':
Track volume should be maintained even if track is restored
-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); |