summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/FastMixer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/audioflinger/FastMixer.cpp')
-rw-r--r--services/audioflinger/FastMixer.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/services/audioflinger/FastMixer.cpp b/services/audioflinger/FastMixer.cpp
index 67e2e6e..220ebf3 100644
--- a/services/audioflinger/FastMixer.cpp
+++ b/services/audioflinger/FastMixer.cpp
@@ -31,7 +31,7 @@
#include <utils/Log.h>
#include <utils/Trace.h>
#include <system/audio.h>
-#ifdef FAST_MIXER_STATISTICS
+#ifdef FAST_THREAD_STATISTICS
#include <cpustats/CentralTendencyStatistics.h>
#ifdef CPU_FREQUENCY_STATISTICS
#include <cpustats/ThreadCpuUsage.h>
@@ -82,7 +82,7 @@ FastMixer::FastMixer() : FastThread(),
fastTrackNames[i] = -1;
generations[i] = 0;
}
-#ifdef FAST_MIXER_STATISTICS
+#ifdef FAST_THREAD_STATISTICS
oldLoad.tv_sec = 0;
oldLoad.tv_nsec = 0;
#endif
@@ -195,13 +195,15 @@ void FastMixer::onStateChange()
underrunNs = (frameCount * 1750000000LL) / sampleRate; // 1.75
overrunNs = (frameCount * 500000000LL) / sampleRate; // 0.50
forceNs = (frameCount * 950000000LL) / sampleRate; // 0.95
- warmupNs = (frameCount * 500000000LL) / sampleRate; // 0.50
+ warmupNsMin = (frameCount * 750000000LL) / sampleRate; // 0.75
+ warmupNsMax = (frameCount * 1250000000LL) / sampleRate; // 1.25
} else {
periodNs = 0;
underrunNs = 0;
overrunNs = 0;
forceNs = 0;
- warmupNs = 0;
+ warmupNsMin = 0;
+ warmupNsMax = LONG_MAX;
}
mMixerBufferState = UNDEFINED;
#if !LOG_NDEBUG