resolved conflicts for merge of f3a892ab to ics-aah

Change-Id: Id9c0ef089d4ed71dbf69c5969b36f9ac44a25ad3
This commit is contained in:
Eric Laurent
2011-11-08 09:52:15 -08:00

View File

@@ -2160,7 +2160,16 @@ uint32_t AudioFlinger::MixerThread::prepareTracks_l(const SortedVector< wp<Track
// The first time a track is added we wait
// for all its buffers to be filled before processing it
mAudioMixer->setActiveTrack(track->name());
if (track->framesReady() && track->isReady() &&
// make sure that we have enough frames to mix one full buffer
uint32_t minFrames = 1;
if (!track->isStopped() && !track->isPausing()) {
if (t->sampleRate() == (int)mSampleRate) {
minFrames = mFrameCount;
} else {
minFrames = (mFrameCount * t->sampleRate()) / mSampleRate + 1;
}
}
if ((track->framesReady() >= minFrames) && track->isReady() &&
!track->isPaused() && !track->isTerminated())
{
//LOGV("track %d u=%08x, s=%08x [OK] on thread %p", track->name(), cblk->user, cblk->server, this);