Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recreate AudioProcessor on source/target audio format change #190

Merged
merged 2 commits into from
May 9, 2022

Conversation

izzytwosheds
Copy link
Contributor

Currently AudioRenderer initializes AudioProcessor once, when created. What happens in reality sometimes (as reported in #188) audio track format reported in track metadata does not correspond to actual track format reported by MediaCodec. This causes audio processing to fail because we initialize AudioProcessor for one set of sampling rate / channel count combination but actual sampling rate / channel count could be different which causes a BufferOverflowException.
Solution is to re-create AudioProcessor each time either source or target format changes. This ensures that it is configured correctly.

@izzytwosheds izzytwosheds merged commit 70a05a0 into linkedin:main May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants