Loading services/audioflinger/datapath/AudioStreamOut.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -99,15 +99,15 @@ status_t AudioStreamOut::getPresentationPosition(uint64_t *frames, struct timesp return status; } // Adjust for standby using HAL rate frames. // Only apply this correction if the HAL is getting PCM frames. if (mHalFormatHasProportionalFrames) { if (mHalFormatHasProportionalFrames && (flags & AUDIO_OUTPUT_FLAG_DIRECT) == AUDIO_OUTPUT_FLAG_DIRECT) { // For DirectTrack reset timestamp to 0 on standby. const uint64_t adjustedPosition = (halPosition <= mFramesWrittenAtStandby) ? 0 : (halPosition - mFramesWrittenAtStandby); // Scale from HAL sample rate to application rate. *frames = adjustedPosition / mRateMultiplier; } else { // For offloaded MP3 and other compressed formats. // For offloaded MP3 and other compressed formats, and linear PCM. *frames = halPosition; } Loading Loading
services/audioflinger/datapath/AudioStreamOut.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -99,15 +99,15 @@ status_t AudioStreamOut::getPresentationPosition(uint64_t *frames, struct timesp return status; } // Adjust for standby using HAL rate frames. // Only apply this correction if the HAL is getting PCM frames. if (mHalFormatHasProportionalFrames) { if (mHalFormatHasProportionalFrames && (flags & AUDIO_OUTPUT_FLAG_DIRECT) == AUDIO_OUTPUT_FLAG_DIRECT) { // For DirectTrack reset timestamp to 0 on standby. const uint64_t adjustedPosition = (halPosition <= mFramesWrittenAtStandby) ? 0 : (halPosition - mFramesWrittenAtStandby); // Scale from HAL sample rate to application rate. *frames = adjustedPosition / mRateMultiplier; } else { // For offloaded MP3 and other compressed formats. // For offloaded MP3 and other compressed formats, and linear PCM. *frames = halPosition; } Loading