Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cras: Limit frames in dev_stream_mix with playable frames
Limit the number of readable frames to the number of playable frames to prevent the playable frame count from becoming negative. It is possible that the combined number of readable frames from two shmem buffers exceeds the number of playable frames. When this happens, all readable frames will be consumed, causing the playable frame count to be negative and the stream to be removed. BUG=b:363857765 TEST=Switch between ARCVM and YouTube streams with BT headset and check that the music is playing as expected. Change-Id: Ic0013b3b91b470c131525228c082775ff41f6136 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/5904749 Commit-Queue: Pattara Teerapong <pteerapong@chromium.org> Tested-by: chromeos-cop-builder@chromeos-cop.iam.gserviceaccount.com <chromeos-cop-builder@chromeos-cop.iam.gserviceaccount.com> Reviewed-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
- Loading branch information