Fix AudioEngine to allow re-initialization - DO NOT MERGE

Add AudioEngine::CompareAndSetEngine and change
VariableSpeed::initializeEngine to use this method so it only initializes
a new engine once rather than asserting on subsequent calls.

Change AudioEngine::DeleteEngine so it ignores repeated calls instead of
asserting. Add VariableSpeed::isReadyToPlay so callers can detect when
the audio library has been properly initialized.

Bug:11511992
Change-Id: I4517cb2ab4c186da43dffc7dbc2a9ad49000059f
(cherry picked from commit 8502b724a9fdc104e7b4a3aba1641e101b4c7be9)
6 files changed
tree: 08e2e3db703c977325d4d0fb15d01831a888b5eb
  1. camera2/
  2. carousel/
  3. chips/
  4. common/
  5. photoviewer/
  6. variablespeed/
  7. widget/
  8. CleanSpec.mk