diff options
author | Glenn Kasten <gkasten@google.com> | 2014-01-16 17:44:23 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2014-03-25 16:22:54 -0700 |
commit | 66e4635cb09fadcaccf912f37c387396c428378a (patch) | |
tree | 7982a54dbc04375babd42e59c03ef930454a9687 /media | |
parent | 1392eb3d1802e9f894f87d7a7387207d1b6faca1 (diff) | |
download | frameworks_av-66e4635cb09fadcaccf912f37c387396c428378a.zip frameworks_av-66e4635cb09fadcaccf912f37c387396c428378a.tar.gz frameworks_av-66e4635cb09fadcaccf912f37c387396c428378a.tar.bz2 |
Use symbolic constants from <system/audio.h>
AUDIO_INTERLEAVE_*
AUDIO_STREAM_MIN
AUDIO_SESSION_ALLOCATE
Change-Id: I31dd6f327204685e50716079ce21c4ba206dff11
Diffstat (limited to 'media')
-rw-r--r-- | media/libmedia/AudioTrack.cpp | 12 | ||||
-rw-r--r-- | media/libmedia/ToneGenerator.cpp | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index 20c1cdb..74c1800 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -333,8 +333,8 @@ status_t AudioTrack::set( mOffloadInfo = NULL; } - mVolume[LEFT] = 1.0f; - mVolume[RIGHT] = 1.0f; + mVolume[AUDIO_INTERLEAVE_LEFT] = 1.0f; + mVolume[AUDIO_INTERLEAVE_RIGHT] = 1.0f; mSendLevel = 0.0f; // mFrameCount is initialized in createTrack_l mReqFrameCount = frameCount; @@ -573,8 +573,8 @@ status_t AudioTrack::setVolume(float left, float right) } AutoMutex lock(mLock); - mVolume[LEFT] = left; - mVolume[RIGHT] = right; + mVolume[AUDIO_INTERLEAVE_LEFT] = left; + mVolume[AUDIO_INTERLEAVE_RIGHT] = right; mProxy->setVolumeLR((uint32_t(uint16_t(right * 0x1000)) << 16) | uint16_t(left * 0x1000)); @@ -1134,8 +1134,8 @@ status_t AudioTrack::createTrack_l(size_t epoch) mStaticProxy = new StaticAudioTrackClientProxy(cblk, buffers, frameCount, mFrameSizeAF); mProxy = mStaticProxy; } - mProxy->setVolumeLR((uint32_t(uint16_t(mVolume[RIGHT] * 0x1000)) << 16) | - uint16_t(mVolume[LEFT] * 0x1000)); + mProxy->setVolumeLR((uint32_t(uint16_t(mVolume[AUDIO_INTERLEAVE_RIGHT] * 0x1000)) << 16) | + uint16_t(mVolume[AUDIO_INTERLEAVE_LEFT] * 0x1000)); mProxy->setSendLevel(mSendLevel); mProxy->setSampleRate(mSampleRate); mProxy->setEpoch(epoch); diff --git a/media/libmedia/ToneGenerator.cpp b/media/libmedia/ToneGenerator.cpp index adef3be..61b6d36 100644 --- a/media/libmedia/ToneGenerator.cpp +++ b/media/libmedia/ToneGenerator.cpp @@ -1057,7 +1057,7 @@ bool ToneGenerator::initAudioTrack() { 0, // notificationFrames 0, // sharedBuffer mThreadCanCallJava, - 0, // sessionId + AUDIO_SESSION_ALLOCATE, AudioTrack::TRANSFER_CALLBACK); if (mpAudioTrack->initCheck() != NO_ERROR) { |