diff options
author | Glenn Kasten <gkasten@google.com> | 2012-01-17 14:39:34 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2012-01-20 16:19:59 -0800 |
commit | 83d86538c4c479a9225c75ab27938e8f05abb9c8 (patch) | |
tree | 72fdff9fb9bb7e41fe48c41bfed65ab83b64f85f /media/libmedia | |
parent | 58f30210ea540b6ce5aa6a46330cd3499483cb97 (diff) | |
download | frameworks_av-83d86538c4c479a9225c75ab27938e8f05abb9c8.zip frameworks_av-83d86538c4c479a9225c75ab27938e8f05abb9c8.tar.gz frameworks_av-83d86538c4c479a9225c75ab27938e8f05abb9c8.tar.bz2 |
Make AudioTrack control block volume field private
This is part of the process of abstracting the control block
to make it easier to maintain.
Change-Id: Idb8f461e68dab3bcf268159cc0781651c6fb7094
Diffstat (limited to 'media/libmedia')
-rw-r--r-- | media/libmedia/AudioTrack.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index 17e3d4b..90a67db 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -501,7 +501,7 @@ status_t AudioTrack::setVolume(float left, float right) mVolume[LEFT] = left; mVolume[RIGHT] = right; - mCblk->volumeLR = (uint32_t(uint16_t(right * 0x1000)) << 16) | uint16_t(left * 0x1000); + mCblk->setVolumeLR((uint32_t(uint16_t(right * 0x1000)) << 16) | uint16_t(left * 0x1000)); return NO_ERROR; } @@ -837,7 +837,7 @@ status_t AudioTrack::createTrack_l( mCblk->stepUser(mCblk->frameCount); } - mCblk->volumeLR = (uint32_t(uint16_t(mVolume[RIGHT] * 0x1000)) << 16) | uint16_t(mVolume[LEFT] * 0x1000); + mCblk->setVolumeLR((uint32_t(uint16_t(mVolume[RIGHT] * 0x1000)) << 16) | uint16_t(mVolume[LEFT] * 0x1000)); mCblk->setSendLevel(mSendLevel); mAudioTrack->attachAuxEffect(mAuxEffectId); mCblk->bufferTimeoutMs = MAX_STARTUP_TIMEOUT_MS; @@ -1320,7 +1320,7 @@ void AudioTrack::AudioTrackThread::onFirstRef() audio_track_cblk_t::audio_track_cblk_t() : lock(Mutex::SHARED), cv(Condition::SHARED), user(0), server(0), userBase(0), serverBase(0), buffers(0), frameCount(0), - loopStart(UINT_MAX), loopEnd(UINT_MAX), loopCount(0), volumeLR(0), + loopStart(UINT_MAX), loopEnd(UINT_MAX), loopCount(0), mVolumeLR(0x10001000), mSendLevel(0), flags(0) { } |