summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorseunghak.han <seunghak.han@lge.com>2014-11-22 15:22:35 +0900
committerGlenn Kasten <gkasten@google.com>2014-12-01 11:29:03 -0800
commite6a9d65845032644b0865b6e3d0b5a820f35d9e4 (patch)
tree59dfcc773644b1b308d662ebbf38542f9ffedcc6 /media
parent1a9c3954a20800dda3d6d18048c7f0edc8c53e6a (diff)
downloadframeworks_av-e6a9d65845032644b0865b6e3d0b5a820f35d9e4.zip
frameworks_av-e6a9d65845032644b0865b6e3d0b5a820f35d9e4.tar.gz
frameworks_av-e6a9d65845032644b0865b6e3d0b5a820f35d9e4.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')
-rw-r--r--media/libmedia/AudioTrack.cpp6
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);