Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 15c7247e authored by Eric Laurent's avatar Eric Laurent Committed by The Android Open Source Project
Browse files

AI 144053: Fix issue #1751242 A2DP playback fails first time: Invalid buffer...

AI 144053: Fix issue #1751242 A2DP playback fails first time: Invalid buffer size: minFrameCount 10240, frameCount 4800
  The problem comes from the fact that AudioSystem::getOutputFrameCount() calls getOutput() to retrieve the active output (A2DP or Hardware) before calling get_audio_flinger(). If it is the first time AudioSystem::getOutputFrameCount() is called in a given process, getOutput() will return a wrong value because gA2dpEnabled has not yet been updated by get_audio_flinger().
  The fix consists in calling get_audio_flinger() in getOutput() to be sure that gA2dpEnabled is valid when getOutput() reads it.
  BUG=1751242

Automated import of CL 144053
parent 3f6fc880
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment