Loading include/media/AudioTrack.h +5 −0 Original line number Diff line number Diff line Loading @@ -830,6 +830,11 @@ protected: bool isDirect_l() const { return (mFlags & AUDIO_OUTPUT_FLAG_DIRECT) != 0; } // pure pcm data is mixable (which excludes HW_AV_SYNC, with embedded timing) bool isPurePcmData_l() const { return audio_is_linear_pcm(mFormat) && (mAttributes.flags & AUDIO_FLAG_HW_AV_SYNC) == 0; } // increment mPosition by the delta of mServer, and return new value of mPosition Modulo<uint32_t> updateAndGetPosition_l(); Loading media/libmedia/AudioTrack.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -1016,7 +1016,11 @@ status_t AudioTrack::getPosition(uint32_t *position) } AutoMutex lock(mLock); if (isOffloadedOrDirect_l()) { // FIXME: offloaded and direct tracks call into the HAL for render positions // for compressed/synced data; however, we use proxy position for pure linear pcm data // as we do not know the capability of the HAL for pcm position support and standby. // There may be some latency differences between the HAL position and the proxy position. if (isOffloadedOrDirect_l() && !isPurePcmData_l()) { uint32_t dspFrames = 0; if (isOffloaded_l() && ((mState == STATE_PAUSED) || (mState == STATE_PAUSED_STOPPING))) { Loading Loading
include/media/AudioTrack.h +5 −0 Original line number Diff line number Diff line Loading @@ -830,6 +830,11 @@ protected: bool isDirect_l() const { return (mFlags & AUDIO_OUTPUT_FLAG_DIRECT) != 0; } // pure pcm data is mixable (which excludes HW_AV_SYNC, with embedded timing) bool isPurePcmData_l() const { return audio_is_linear_pcm(mFormat) && (mAttributes.flags & AUDIO_FLAG_HW_AV_SYNC) == 0; } // increment mPosition by the delta of mServer, and return new value of mPosition Modulo<uint32_t> updateAndGetPosition_l(); Loading
media/libmedia/AudioTrack.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -1016,7 +1016,11 @@ status_t AudioTrack::getPosition(uint32_t *position) } AutoMutex lock(mLock); if (isOffloadedOrDirect_l()) { // FIXME: offloaded and direct tracks call into the HAL for render positions // for compressed/synced data; however, we use proxy position for pure linear pcm data // as we do not know the capability of the HAL for pcm position support and standby. // There may be some latency differences between the HAL position and the proxy position. if (isOffloadedOrDirect_l() && !isPurePcmData_l()) { uint32_t dspFrames = 0; if (isOffloaded_l() && ((mState == STATE_PAUSED) || (mState == STATE_PAUSED_STOPPING))) { Loading