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

Fix ENCODING_DTS_UHD_P2 Issue #1299

Merged

Conversation

cedricxperi
Copy link
Contributor

During Direct Passthrough Audio Playback on platforms that supports AudioFormat.ENCODING_DTS_UHD_P2, we need to include C.ENCODING_DTS_UHD_P2 in DefaultAudioSink.getFramesPerEncodedSample() and DefaultAudioTrackBufferSizeProvider.getMaximumEncodedRateBytesPerSecond().

@cedricxperi
Copy link
Contributor Author

@microkatz Here is the new PR that merges into main branch. Thanks.

@microkatz microkatz self-assigned this Apr 22, 2024
@microkatz
Copy link
Contributor

@cedricxperi

Thanks for creating the new PR! One quick point, I think you may have missed a spot in the DefaultAudioTrackBufferSizeProvider.getPassthroughBufferSizeInBytes method? Would ENCODING_DTS_UHD_P2 need the same multiple for the buffersize computation for passthrough as ENCODING_DTS_HD?

@cedricxperi
Copy link
Contributor Author

@cedricxperi

Thanks for creating the new PR! One quick point, I think you may have missed a spot in the DefaultAudioTrackBufferSizeProvider.getPassthroughBufferSizeInBytes method? Would ENCODING_DTS_UHD_P2 need the same multiple for the buffersize computation for passthrough as ENCODING_DTS_HD?

@microkatz Thanks for pointing that out. However, DTS:X Profile 2 has a smaller number of audio samples per channel per frame compared to DTS-HD (DTS Express). So it does not require a bigger multiple for buffersize computation. :)

@microkatz
Copy link
Contributor

I'm going to send this for internal review now. You may see some more commits being added as I make changes in response to review feedback. Please refrain from pushing any more substantive changes as it will complicate the internal review - thanks!

@copybara-service copybara-service bot merged commit 0969043 into androidx:main May 7, 2024
1 check passed
@androidx androidx locked and limited conversation to collaborators Jul 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants