Allow to use float output in any case if output provider doesn't support 16-bit int#3104
Open
nift4 wants to merge 1 commit intoandroidx:mainfrom
Open
Allow to use float output in any case if output provider doesn't support 16-bit int#3104nift4 wants to merge 1 commit intoandroidx:mainfrom
nift4 wants to merge 1 commit intoandroidx:mainfrom
Conversation
support 16-bit int This commit is a continuation of 4f4ad5f and fe4f235 by Toni, decoupling DefaultAudioSink logic from assumptions that AudioTrack is used. * If audio output provider doesn't support 16-bit int PCM, we should use float PCM in any case, even if input isn't high-resolution PCM * Unlike when this check was written, ToFloatPcmAudioProcessor now supports every linear PCM format, similar to ToIntPcmAudioProcessor, it is no longer limited to high-resolution only * While AudioTrack (and by extension AudioTrackAudioOutputProvider) always supports 16-bit int (hence, this change is a no-op for them), it may not apply to other ways of outputting PCM * Additionally, the same applies to the provider possibly not supporting float PCM output. Currently, we have the enableFloatOutput option, but this is scheduled to be replaced by a more generic one. While we're here, we can address it as well by adding a check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit is a continuation of 4f4ad5f and fe4f235 by Toni, decoupling DefaultAudioSink logic from assumptions that AudioTrack is used.