-
Notifications
You must be signed in to change notification settings - Fork 543
Better support for PCM audio formats around DefaultAudioSink #2445
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @nift4, thanks for your PR. From what I can see, the PR seems to be doing a few different things:
- Modifying
DefaultAudioSink
to allow an arbitrary PCM encoding (including changes inDefaultRenderersFactory)
. - Adding support in the codebase for
PCM_DOUBLE
andDSD
.
These two items seem to be independent changes. Can you please split them out onto separate PRs to ease the review process? Thanks!
This change: - abstracts away the fact that SonicAudioProcessor does not support float PCM from the audio sink to the audio processor chain (easier to replace) - makes the audio sink allow custom audio processors with any output format - adds a new mode to DefaultAudioSink that allows any supported linear PCM format to be output into the AudioTrack Issue: google/ExoPlayer#10516 Issue: androidx#1931
Hi @ivanbuper, no problem, I have split the PR into this one and #2500. Thanks in advance for the review :) |
@microkatz Would you mind taking a look at this one? I can do #2500. Thanks! |
@microkatz (or whoever will look into this one): there is also the internal draft cl/592161260 that is roughly the same as this PR, so we should check where they differ and what makes most sense for the API. @nift4: Some question based on a quick look:
|
Hi @tonihei , |
Oh I just realized I missed a question,
No, the idea is that audio sink does least possible work. For example, imagine following scenario:
always avoiding work in audio sink and letting audioflinger do the work avoids these without additional effort in coding, and will provide best battery life because conversion will be done in native code |
Sorry for the review request, it seems to have requested it from the wrong person. It seems like I don't have permission to assign / request microkatz |
This change:
Issue: google/ExoPlayer#10516
Issue: #1931