Loading services/audioflinger/Threads.cpp +7 −5 Original line number Diff line number Diff line Loading @@ -3008,6 +3008,7 @@ void AudioFlinger::PlaybackThread::readOutputParameters_l() // Calculate size of normal sink buffer relative to the HAL output buffer size double multiplier = 1.0; // Note: mType == SPATIALIZER does not support FastMixer. if (mType == MIXER && (kUseFastMixer == FastMixer_Static || kUseFastMixer == FastMixer_Dynamic)) { size_t minNormalFrameCount = (kMinNormalSinkBufferSizeMs * mSampleRate) / 1000; Loading Loading @@ -3695,7 +3696,7 @@ bool AudioFlinger::PlaybackThread::threadLoop() cacheParameters_l(); mSleepTimeUs = mIdleSleepTimeUs; if (mType == MIXER) { if (mType == MIXER || mType == SPATIALIZER) { sleepTimeShift = 0; } Loading Loading @@ -3873,7 +3874,7 @@ bool AudioFlinger::PlaybackThread::threadLoop() mStandbyTimeNs = systemTime() + mStandbyDelayNs; mSleepTimeUs = mIdleSleepTimeUs; if (mType == MIXER) { if (mType == MIXER || mType == SPATIALIZER) { sleepTimeShift = 0; } Loading Loading @@ -4150,7 +4151,8 @@ bool AudioFlinger::PlaybackThread::threadLoop() // write blocked detection const int64_t deltaWriteNs = lastIoEndNs - lastIoBeginNs; if (mType == MIXER && deltaWriteNs > maxPeriod) { if ((mType == MIXER || mType == SPATIALIZER) && deltaWriteNs > maxPeriod) { mNumDelayedWrites++; if ((lastIoEndNs - lastWarning) > kWarningThrottleNs) { ATRACE_NAME("underrun"); Loading @@ -4171,7 +4173,7 @@ bool AudioFlinger::PlaybackThread::threadLoop() (mMixerStatus == MIXER_DRAIN_ALL)) { threadLoop_drain(); } if (mType == MIXER && !mStandby) { if ((mType == MIXER || mType == SPATIALIZER) && !mStandby) { if (mThreadThrottle && mMixerStatus == MIXER_TRACKS_READY // we are mixing (active tracks) Loading Loading
services/audioflinger/Threads.cpp +7 −5 Original line number Diff line number Diff line Loading @@ -3008,6 +3008,7 @@ void AudioFlinger::PlaybackThread::readOutputParameters_l() // Calculate size of normal sink buffer relative to the HAL output buffer size double multiplier = 1.0; // Note: mType == SPATIALIZER does not support FastMixer. if (mType == MIXER && (kUseFastMixer == FastMixer_Static || kUseFastMixer == FastMixer_Dynamic)) { size_t minNormalFrameCount = (kMinNormalSinkBufferSizeMs * mSampleRate) / 1000; Loading Loading @@ -3695,7 +3696,7 @@ bool AudioFlinger::PlaybackThread::threadLoop() cacheParameters_l(); mSleepTimeUs = mIdleSleepTimeUs; if (mType == MIXER) { if (mType == MIXER || mType == SPATIALIZER) { sleepTimeShift = 0; } Loading Loading @@ -3873,7 +3874,7 @@ bool AudioFlinger::PlaybackThread::threadLoop() mStandbyTimeNs = systemTime() + mStandbyDelayNs; mSleepTimeUs = mIdleSleepTimeUs; if (mType == MIXER) { if (mType == MIXER || mType == SPATIALIZER) { sleepTimeShift = 0; } Loading Loading @@ -4150,7 +4151,8 @@ bool AudioFlinger::PlaybackThread::threadLoop() // write blocked detection const int64_t deltaWriteNs = lastIoEndNs - lastIoBeginNs; if (mType == MIXER && deltaWriteNs > maxPeriod) { if ((mType == MIXER || mType == SPATIALIZER) && deltaWriteNs > maxPeriod) { mNumDelayedWrites++; if ((lastIoEndNs - lastWarning) > kWarningThrottleNs) { ATRACE_NAME("underrun"); Loading @@ -4171,7 +4173,7 @@ bool AudioFlinger::PlaybackThread::threadLoop() (mMixerStatus == MIXER_DRAIN_ALL)) { threadLoop_drain(); } if (mType == MIXER && !mStandby) { if ((mType == MIXER || mType == SPATIALIZER) && !mStandby) { if (mThreadThrottle && mMixerStatus == MIXER_TRACKS_READY // we are mixing (active tracks) Loading