OSDN Git Service

audioflinger: fix static track end detection
authorEric Laurent <elaurent@google.com>
Sat, 21 Dec 2013 01:36:01 +0000 (17:36 -0800)
committerEric Laurent <elaurent@google.com>
Sat, 21 Dec 2013 01:36:01 +0000 (17:36 -0800)
commit13e4c960ea3db03a43e084fbd85d52aa77f7b871
treee65e5e2050066bcb0dfd97c4d9c1097cab369d1c
parenta9fa836ddfcb0cc91d1ff9edeeba4c8b8047bd8a
audioflinger: fix static track end detection

If a static track is not a fast track,
prepareTracks_l() must rely on framesReady() to
detect end of buffer and remove the track from the active
track list.
Failing to do so results in the track staying active but
not processed by the mixer because in underrun. This leaves the
mix buffer content uninitialized and causes the effect process
function to accumulate its output onto undefined data.

Bug: 12013676.
Change-Id: Iad72c921fa18d34811abf7d1073890c093a27725
services/audioflinger/Threads.cpp