summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/FastCapture.cpp
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2015-01-29 10:02:44 -0800
committerGlenn Kasten <gkasten@google.com>2015-02-19 09:47:44 -0800
commitd2123e631834a887c2d8600c3ac43dda02d47cb9 (patch)
tree1b0fbc7dd7ffb18d7a7084f2cff34f82c61a25b2 /services/audioflinger/FastCapture.cpp
parentad8510a339ffab330c2c46e5c247dd1cf9e15c22 (diff)
downloadframeworks_av-d2123e631834a887c2d8600c3ac43dda02d47cb9.zip
frameworks_av-d2123e631834a887c2d8600c3ac43dda02d47cb9.tar.gz
frameworks_av-d2123e631834a887c2d8600c3ac43dda02d47cb9.tar.bz2
Warmup cycles must be in range and consecutive
Change-Id: Ie8a40ec3547bdd62a1e2e05b11fb107c25841784
Diffstat (limited to 'services/audioflinger/FastCapture.cpp')
-rw-r--r--services/audioflinger/FastCapture.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/services/audioflinger/FastCapture.cpp b/services/audioflinger/FastCapture.cpp
index 1c4f670..255496e 100644
--- a/services/audioflinger/FastCapture.cpp
+++ b/services/audioflinger/FastCapture.cpp
@@ -138,13 +138,15 @@ void FastCapture::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;
}
readBufferState = -1;
dumpState->mFrameCount = frameCount;