diff options
author | Eric Laurent <elaurent@google.com> | 2013-10-01 05:26:24 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-10-01 05:26:24 -0700 |
commit | 3424d6e17637e0743ddf3bf4688af8ee36e69264 (patch) | |
tree | 8589c02ab3b2e185cb06e030ae376cb38d730231 /media/libmedia | |
parent | d28076022746e36af16260da899718ab74a2b454 (diff) | |
parent | 1adf20ce868b80a24f7387daa6549364d5509c6a (diff) | |
download | frameworks_av-3424d6e17637e0743ddf3bf4688af8ee36e69264.zip frameworks_av-3424d6e17637e0743ddf3bf4688af8ee36e69264.tar.gz frameworks_av-3424d6e17637e0743ddf3bf4688af8ee36e69264.tar.bz2 |
am 1adf20ce: Merge "fix volume and effect enable delay on offloaded tracks" into klp-dev
* commit '1adf20ce868b80a24f7387daa6549364d5509c6a':
fix volume and effect enable delay on offloaded tracks
Diffstat (limited to 'media/libmedia')
-rw-r--r-- | media/libmedia/AudioTrack.cpp | 3 | ||||
-rw-r--r-- | media/libmedia/IAudioTrack.cpp | 12 |
2 files changed, 15 insertions, 0 deletions
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index 754a4e3..37d50cf 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -534,6 +534,9 @@ status_t AudioTrack::setVolume(float left, float right) mProxy->setVolumeLR((uint32_t(uint16_t(right * 0x1000)) << 16) | uint16_t(left * 0x1000)); + if (isOffloaded()) { + mAudioTrack->signal(); + } return NO_ERROR; } diff --git a/media/libmedia/IAudioTrack.cpp b/media/libmedia/IAudioTrack.cpp index f0d75ba..3cd9cfd 100644 --- a/media/libmedia/IAudioTrack.cpp +++ b/media/libmedia/IAudioTrack.cpp @@ -41,6 +41,7 @@ enum { SET_MEDIA_TIME_TRANSFORM, SET_PARAMETERS, GET_TIMESTAMP, + SIGNAL, }; class BpAudioTrack : public BpInterface<IAudioTrack> @@ -182,6 +183,12 @@ public: } return status; } + + virtual void signal() { + Parcel data, reply; + data.writeInterfaceToken(IAudioTrack::getInterfaceDescriptor()); + remote()->transact(SIGNAL, data, &reply); + } }; IMPLEMENT_META_INTERFACE(AudioTrack, "android.media.IAudioTrack"); @@ -269,6 +276,11 @@ status_t BnAudioTrack::onTransact( } return NO_ERROR; } break; + case SIGNAL: { + CHECK_INTERFACE(IAudioTrack, data, reply); + signal(); + return NO_ERROR; + } break; default: return BBinder::onTransact(code, data, reply, flags); } |