diff options
author | Glenn Kasten <gkasten@android.com> | 2014-12-02 17:16:00 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-12-02 17:16:01 +0000 |
commit | 5458756afe20079055d65d9545399288b9298055 (patch) | |
tree | e2986ccaf4ce4b3ba41d7b6ba96781953fe46ac0 /media | |
parent | 592f3bc86d6f0aceb408961eae3cced1c2203af9 (diff) | |
parent | e6a9d65845032644b0865b6e3d0b5a820f35d9e4 (diff) | |
download | frameworks_av-5458756afe20079055d65d9545399288b9298055.zip frameworks_av-5458756afe20079055d65d9545399288b9298055.tar.gz frameworks_av-5458756afe20079055d65d9545399288b9298055.tar.bz2 |
Merge "Track volume should be maintained even if track is restored"
Diffstat (limited to 'media')
-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 5379809..b18a528 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -1218,7 +1218,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); |