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

Allow changing DefaultAudioSink.offloadMode #133

Open
yschimke opened this issue Jul 30, 2022 · 3 comments
Open

Allow changing DefaultAudioSink.offloadMode #133

yschimke opened this issue Jul 30, 2022 · 3 comments
Assignees

Comments

@yschimke
Copy link
Contributor

Use case description

Audio offload may remove features such as volume normalization, gapless playback, playback speed.
If offload is provided as a user preference, it should be possible to change the mode in DefaultAudioSink without restarting to destroy the ExoPlayer instance and it's AudioSink.

Proposed solution

Allow changing the offload mode on an existing DefaultAudioSink, potentially only when not actively playing.

Alternatives considered

Some mechanism to tear down an ExoPlayer instance and rebuild it?

@tonihei
Copy link
Collaborator

tonihei commented Aug 2, 2022

Offload integration in ExoPlayer is still an experimental feature and subject to future changes. The final integration likely uses a different way to set the offload preferences other than hardcoding them in the constructor of DefaultAudioSink. I'll keep this issue open because changing the value is not currently supported.

@tonihei tonihei self-assigned this Aug 2, 2022
@yschimke
Copy link
Contributor Author

yschimke commented Aug 2, 2022

There are still some edge cases that can cause offload to be disabled until process restart.

If you start playing with a headset that isn't compatible with offload, then even if you change later to a compatible headset, it will keep using non offloaded.

But good to hear about the final integration, sounds good.

Feel free to close if it's no longer planned.

@yschimke
Copy link
Contributor Author

Flagging that for any apps that want mixed formats on Wear, such as Music + Podcasts, may want to enable/disable offload when a new playlist is selected. Tearing down exoplayer seems very disruptive for this.

Are there other options to achieve this? Say a decorating AudioSink?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants