summaryrefslogtreecommitdiffstats
path: root/services/audioflinger
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2014-05-12 11:06:26 -0700
committerGlenn Kasten <gkasten@google.com>2014-05-22 16:19:05 -0700
commit29b703eec27b305e7b5b2343bf257643e38f6b68 (patch)
tree0612b8e650dac1f4f7c2e51afa187b4601f113ca /services/audioflinger
parent6181ffd90a436f333c43a7f812391eee2c35005a (diff)
downloadframeworks_av-29b703eec27b305e7b5b2343bf257643e38f6b68.zip
frameworks_av-29b703eec27b305e7b5b2343bf257643e38f6b68.tar.gz
frameworks_av-29b703eec27b305e7b5b2343bf257643e38f6b68.tar.bz2
Move validation of frameCount from set to openRecord_l
This move is needed because frameCount is validated on server side for fast tracks (as should be done for normal tracks too). Change-Id: I6d99e80869fd90fab373cf60ef348c01f075fbca
Diffstat (limited to 'services/audioflinger')
-rw-r--r--services/audioflinger/Threads.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index cdc9a19..b6782a9 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -5128,6 +5128,7 @@ sp<AudioFlinger::RecordThread::RecordTrack> AudioFlinger::RecordThread::createRe
// to be at least 2 x the record thread frame count and cover audio hardware latency.
// This is probably too conservative, but legacy application code may depend on it.
// If you change this calculation, also review the start threshold which is related.
+ // FIXME It's not clear how input latency actually matters. Perhaps this should be 0.
uint32_t latencyMs = 50; // FIXME mInput->stream->get_latency(mInput->stream);
size_t mNormalFrameCount = 2048; // FIXME
uint32_t minBufCount = latencyMs / ((1000 * mNormalFrameCount) / mSampleRate);