summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-01-17 14:39:34 -0800
committerGlenn Kasten <gkasten@google.com>2012-01-20 16:19:59 -0800
commitbc4de888c12f1ad9aec8c9b2a0addaaa73dceae9 (patch)
tree0dece8e783d706b57edff22ccc33d469069ccdd8 /media
parent0a204ed0f58a9baaac5630864cd75495486c6cbe (diff)
downloadframeworks_base-bc4de888c12f1ad9aec8c9b2a0addaaa73dceae9.zip
frameworks_base-bc4de888c12f1ad9aec8c9b2a0addaaa73dceae9.tar.gz
frameworks_base-bc4de888c12f1ad9aec8c9b2a0addaaa73dceae9.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')
-rw-r--r--media/libmedia/AudioTrack.cpp6
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)
{
}