diff options
author | seunghak.han <seunghak.han@lge.com> | 2014-11-22 15:22:35 +0900 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2014-12-05 10:52:34 -0800 |
commit | be837c328ae1ea2b193d05aaa3d4214c263b5b77 (patch) | |
tree | e57cdef76f6936c4506d270dff4f59d72d202528 /media/libmedia/AudioTrack.cpp | |
parent | d6e7f1e1f8b1dfa6a87c7c0b1a5c68d435096b01 (diff) | |
download | frameworks_av-be837c328ae1ea2b193d05aaa3d4214c263b5b77.zip frameworks_av-be837c328ae1ea2b193d05aaa3d4214c263b5b77.tar.gz frameworks_av-be837c328ae1ea2b193d05aaa3d4214c263b5b77.tar.bz2 |
Track volume should be maintained even if track is restored
If track is restored when it set its volume to a non-unity value (such as mute),
the volume was forced to unity again. Now, the previous volume is restored.
Bug: 18570664
Change-Id: I79f34c6c7d6f535baba813fd3b8ba8e55cac8ad7
Diffstat (limited to 'media/libmedia/AudioTrack.cpp')
-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); |