summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/Threads.cpp
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2013-12-17 16:35:48 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2013-12-17 16:35:48 +0000
commit688ca6330a5e7d072f67a1791e464fa7dec08b72 (patch)
tree876abb6ec32d531ae0f2dd62b5d4d04ed725f9f9 /services/audioflinger/Threads.cpp
parente175e5ec1636fc638465187f3d5c6166d92388ed (diff)
parent5c474238bc579224ec8f7267d05651b0aa934100 (diff)
downloadframeworks_av-688ca6330a5e7d072f67a1791e464fa7dec08b72.zip
frameworks_av-688ca6330a5e7d072f67a1791e464fa7dec08b72.tar.gz
frameworks_av-688ca6330a5e7d072f67a1791e464fa7dec08b72.tar.bz2
am 5c474238: am 5893736d: am a67c7653: Merge "Increase kFastTrackMultiplier from 1 to 2"
* commit '5c474238bc579224ec8f7267d05651b0aa934100': Increase kFastTrackMultiplier from 1 to 2
Diffstat (limited to 'services/audioflinger/Threads.cpp')
-rw-r--r--services/audioflinger/Threads.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 8887b38..35b8575 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -135,12 +135,12 @@ static const int kPriorityFastMixer = 3;
// IAudioFlinger::createTrack() reports back to client the total size of shared memory area
// for the track. The client then sub-divides this into smaller buffers for its use.
-// Currently the client uses double-buffering by default, but doesn't tell us about that.
-// So for now we just assume that client is double-buffered.
-// FIXME It would be better for client to tell AudioFlinger whether it wants double-buffering or
-// N-buffering, so AudioFlinger could allocate the right amount of memory.
+// Currently the client uses N-buffering by default, but doesn't tell us about the value of N.
+// So for now we just assume that client is double-buffered for fast tracks.
+// FIXME It would be better for client to tell AudioFlinger the value of N,
+// so AudioFlinger could allocate the right amount of memory.
// See the client's minBufCount and mNotificationFramesAct calculations for details.
-static const int kFastTrackMultiplier = 1;
+static const int kFastTrackMultiplier = 2;
// ----------------------------------------------------------------------------
@@ -1218,7 +1218,7 @@ sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTrac
(
(tid != -1) &&
((frameCount == 0) ||
- (frameCount >= (mFrameCount * kFastTrackMultiplier)))
+ (frameCount >= mFrameCount))
)
) &&
// PCM data
@@ -4800,7 +4800,7 @@ sp<AudioFlinger::RecordThread::RecordTrack> AudioFlinger::RecordThread::createRe
(
(tid != -1) &&
((frameCount == 0) ||
- (frameCount >= (mFrameCount * kFastTrackMultiplier)))
+ (frameCount >= mFrameCount))
) &&
// FIXME when record supports non-PCM data, also check for audio_is_linear_pcm(format)
// mono or stereo