Fix a rare crash.

- Crash could be reproduced by seeking to the very end of a voicemail,
  playing the voicemail to see the ui reset to beginning, then
  increasing rate.
- Reason was that during playback, insufficient data has been read to
  read the sample rate and channels, and in that situation the increase
  rate requires constructing the time scaler, which in turn requires
  a valid sample rate and channels.
- Added a test to prove that the bug exists, and to prove the fix which
  is to ignore the rate change call when sample rate and channels not
  known.
- Also added another unit test in the process to verify that it's safe
  to call set rate at any point during the life cycle of the player.

Bug: 5140693
Change-Id: I474e5769f2b72762348534e4d06104af247e8726
2 files changed
tree: cbcc2ff06d5fbf2a1c4f88a16a19f7fcbc058946
  1. carousel/
  2. chips/
  3. common/
  4. variablespeed/
  5. CleanSpec.mk