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

Support playback speed adjustment + silence skipping for ENCODING_PCM_FLOAT #7134

Closed
ojw28 opened this issue Mar 23, 2020 · 0 comments
Closed
Assignees

Comments

@ojw28
Copy link
Contributor

ojw28 commented Mar 23, 2020

Playback speed adjustment and silence skipping (and possibly custom audio processing injected by the application) are currently disabled by DefaultAudioSink if the input uses ENCODING_PCM_FLOAT.

I think the idea of this is to avoid resampling 32-bit floating point into into 16-bit integer precision PCM. However, in cases where we actually want to do processing that changes the audio, such as playback speed adjustment and silence skipping, then that should take precedence and we should resample to 16-bit integer precision to enable that processing to take place.

@ojw28 ojw28 self-assigned this Mar 23, 2020
ojw28 added a commit that referenced this issue Mar 25, 2020
This is a no-op for DefaultAudioSink for now, because DefaultAudioSink
currently disables processing anyway if the input uses ENCODING_PCM_FLOAT.

Issue: #7134
PiperOrigin-RevId: 302670534
ojw28 added a commit that referenced this issue Mar 25, 2020
It's incorrect to use an AudioFormat returned from AudioProcessor.configure
unless the AudioProcessor is active.

Issue: #7134
PiperOrigin-RevId: 302674132
ojw28 added a commit that referenced this issue Mar 25, 2020
This is less confusing than having audio processing functionality (e.g., playback
speed adjustment) just "not work" for some pieces of media.

If this change is merged, I will update #6749 to also track making DefaultAudioSink
intelligently enable/disable float output depending on how the audio processors are
configured.

Issue: #7134
PiperOrigin-RevId: 302871568
@ojw28 ojw28 closed this as completed Mar 25, 2020
ojw28 added a commit that referenced this issue Mar 30, 2020
This is a no-op for DefaultAudioSink for now, because DefaultAudioSink
currently disables processing anyway if the input uses ENCODING_PCM_FLOAT.

Issue: #7134
PiperOrigin-RevId: 302670534
ojw28 added a commit that referenced this issue Mar 30, 2020
It's incorrect to use an AudioFormat returned from AudioProcessor.configure
unless the AudioProcessor is active.

Issue: #7134
PiperOrigin-RevId: 302674132
ojw28 added a commit that referenced this issue Mar 30, 2020
This is less confusing than having audio processing functionality (e.g., playback
speed adjustment) just "not work" for some pieces of media.

If this change is merged, I will update #6749 to also track making DefaultAudioSink
intelligently enable/disable float output depending on how the audio processors are
configured.

Issue: #7134
PiperOrigin-RevId: 302871568
@google google locked and limited conversation to collaborators May 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant