summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@android.com>2014-12-02 17:35:50 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-12-02 17:35:50 +0000
commitf4ead8049dc973c21ef9a0f051ccc18671a3adce (patch)
tree9a83582eddfb0c253694a0a7acb0951b66ced0f2 /media
parenta0f1d394aefb2e7c60ba90ea02a3e6c552c96a7c (diff)
parentaef46aa8eff1f975ae5253a334cf0c978427ca86 (diff)
downloadframeworks_av-f4ead8049dc973c21ef9a0f051ccc18671a3adce.zip
frameworks_av-f4ead8049dc973c21ef9a0f051ccc18671a3adce.tar.gz
frameworks_av-f4ead8049dc973c21ef9a0f051ccc18671a3adce.tar.bz2
am aef46aa8: am bde85d05: am 5458756a: Merge "Track volume should be maintained even if track is restored"
* commit 'aef46aa8eff1f975ae5253a334cf0c978427ca86': Track volume should be maintained even if track is restored
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 f38d68a..4b5df24 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);