OSDN Git Service

Fix issue 2115450: a2dp thread is started, even though we are only connected to heads...
authorEric Laurent <elaurent@google.com>
Mon, 14 Sep 2009 08:38:42 +0000 (01:38 -0700)
committerEric Laurent <elaurent@google.com>
Mon, 14 Sep 2009 09:37:15 +0000 (02:37 -0700)
commita6e58fe31667fab8ccfd01912a5e76e5c6f6d71f
treea3f3b0d5c5bc2882949e140b10efc4e0695841b7
parentf79cbd93e679f70c44d00542036deb306f07a809
Fix issue 2115450: a2dp thread is started, even though we are only connected to headset and not playing music.

This is due to a regression introduced by change 24114: when no audio tracks are ready for mixing, 0s are written to audio hardware. However this should only happen if tracks have already been mixed since the audio flinger thread woke up.
Also do not write 0s to audio hardware in direct output threads when audio format is not linear PCM.
libs/audioflinger/AudioFlinger.cpp