Android 4.3 release 0.9.1
audioflinger: fix effects on direct output threads

PlaybackThread::addTrack_l() uses the assumption that
effects are attached to a track only if the track accumulation
buffer is different from the mixer thread output buffer.
This is not true for direct output threads where only one track is active
an only one buffer is needed.
This assumption is an optimization to avoid checking for effect chains with
the same session ID each time a track is processed. The optimization
is not key if only one track is attached to the thread which is the case for
direct outputs.

Current code fails to increment the active track count in the effect chain
on direct output threads when a track is started thus making the effect
framework clear the mix buffer and produce silence each time the mixer runs.

The fix consists in removing the optimization described above.

Bug: 9324989.

Change-Id: Id7a6337450ed90d326299c2ce9fc02f4b9e2fa6f
1 file changed