Loading services/audioflinger/FastMixer.cpp +74 −74 Original line number Diff line number Diff line Loading @@ -517,8 +517,8 @@ bool FastMixer::threadLoop() } // This forces a minimum cycle time. It: // - compensates for an audio HAL with jitter due to sample rate conversion // - works with a variable buffer depth audio HAL that never pulls at a rate // < than overrunNs per buffer. // - works with a variable buffer depth audio HAL that never pulls at a // rate < than overrunNs per buffer. // - recovers from overrun immediately after underrun // It doesn't work with a non-blocking audio HAL. sleepNs = forceNs - nsec; Loading @@ -541,7 +541,7 @@ bool FastMixer::threadLoop() if (sec > 0 && sec < 4) { monotonicNs += sec * 1000000000; } // compute the raw CPU load = delta value of clock_gettime(CLOCK_THREAD_CPUTIME_ID) // compute raw CPU load = delta value of clock_gettime(CLOCK_THREAD_CPUTIME_ID) uint32_t loadNs = 0; struct timespec newLoad; rc = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &newLoad); Loading Loading @@ -578,7 +578,7 @@ bool FastMixer::threadLoop() dumpState->mCpukHz[i] = kHz; #endif // this store #4 is not atomic with respect to stores #1, #2, #3 above, but // the newest open and oldest closed halves are atomic with respect to each other // the newest open & oldest closed halves are atomic with respect to each other dumpState->mBounds = bounds; ATRACE_INT("cycle_ms", monotonicNs / 1000000); ATRACE_INT("load_us", loadNs / 1000); Loading Loading
services/audioflinger/FastMixer.cpp +74 −74 Original line number Diff line number Diff line Loading @@ -517,8 +517,8 @@ bool FastMixer::threadLoop() } // This forces a minimum cycle time. It: // - compensates for an audio HAL with jitter due to sample rate conversion // - works with a variable buffer depth audio HAL that never pulls at a rate // < than overrunNs per buffer. // - works with a variable buffer depth audio HAL that never pulls at a // rate < than overrunNs per buffer. // - recovers from overrun immediately after underrun // It doesn't work with a non-blocking audio HAL. sleepNs = forceNs - nsec; Loading @@ -541,7 +541,7 @@ bool FastMixer::threadLoop() if (sec > 0 && sec < 4) { monotonicNs += sec * 1000000000; } // compute the raw CPU load = delta value of clock_gettime(CLOCK_THREAD_CPUTIME_ID) // compute raw CPU load = delta value of clock_gettime(CLOCK_THREAD_CPUTIME_ID) uint32_t loadNs = 0; struct timespec newLoad; rc = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &newLoad); Loading Loading @@ -578,7 +578,7 @@ bool FastMixer::threadLoop() dumpState->mCpukHz[i] = kHz; #endif // this store #4 is not atomic with respect to stores #1, #2, #3 above, but // the newest open and oldest closed halves are atomic with respect to each other // the newest open & oldest closed halves are atomic with respect to each other dumpState->mBounds = bounds; ATRACE_INT("cycle_ms", monotonicNs / 1000000); ATRACE_INT("load_us", loadNs / 1000); Loading