Let AudioSink indicate if playback speed changes are supported to avoid unnecessary live speed adjustments
- Dominant language
- Java
- Stars
- 21.9k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
### ExoPlayer Version
2.15.0
### Devices that reproduce the issue
Tivo Streaming device running Android 10
Nvidia Sheild running Android 11
### Devices that do not reproduce the issue
_No response_
### Reproducible in the demo app?
Yes
### Reproduction steps
1) Apply attached patch "patch-r2.15.0.txt" to branch at tag r2.15.0. This will generate logs referenced in "Actual result" section below, or you can use your own logging.
2) Play a working (AAC audio) stream and compare with Non-Working (AC3 stream).
### Expected result
Playback speed for AC3 streams should adjust to push liveOffsetUs up to idealTargetLiveOffsetUs.
### Actual result
Note in the logs:
For AAC: liveOffsetUs → currentTargetLiveOffsetUs and adjustedPlaybackSpeed → 1.0 eventually
For AC3: liveOffsetUs does not move towards currentTargetLiveOffsetUs and adjustedPlaybackSpeed stays at 1.3
In both cases above currentTargetLiveOffsetUs →idealTargetLiveOffsetUs, which should be expected behavior. So AAC will eventually end up at the playback position of idealTargetLiveOffsetUs, but not AC3.
The same behavior is seen in r.2.18.X as well as androidx/media (some adjustments are required to trigger/force Playback Speed Control because of [commit](https://github.com/google/ExoPlayer/commit/b09b8dc2aba5f4b54d76a0b958c62aeb5e5b8075), https://github.com/google/ExoPlayer/issues/9329)
### Media
[patch-r2.15.0.txt](https://github.com/google/ExoPlayer/files/10222594/patch-r2.15.0.txt)
Media streaming information will be sent separately via email.
### Bug Report
- [ ] You will email the zip file produced by `adb bugreport` to dev.exoplayer@gmail.com after filing this issue.
Contributor guide
Assessment
This issue has not been assessed yet.