Skip to content

Allow setting preferred devices to AudioTrack  #135

Closed

Description

@yschimke

Use case description

AudioTrack is useful to apps for multiple reasons

  • exposes detailed state of the audio subsystem, such as offload.
  • allows changing the preferred devices

Proposed solution

Make AudioTrack accessible in DefaultAudioSink.

Alternatives considered

Fully expose all interesting bits of AudioSink via accessors in DefaultAudioSink or Player.Listener events.

Activity

  1. tonihei commented on Aug 2, 2022

    @tonihei
    Collaborator

    Besides isAudioOffloadEnabled, which bits of information would you like to expose exactly? It's not quite clear to me what these interesting bits of AudioSink are. We are unlikely to expose the AudioTrack directly as it breaks the encapsulation and may cause unexpected side effects if someone changes AudioTrack in any way outside of DefaultAudioSink.

  2. self-assigned this
    on Aug 2, 2022
  3. yschimke commented on Aug 2, 2022

    @yschimke
    ContributorAuthor

    I think just the preferred devices.

    But more generally once you get to a point that you care about the state of the AudioTrack, it's awkward to do anything without copying and pasting DefaultAudioSink for even the most minor of changes.

    Feel free to close.

  4. tonihei commented on Aug 2, 2022

    @tonihei
    Collaborator

    Thanks, I'll change it to an enhancement tracking how users can specify preferred devices for audio playback.

  5. changed the title [-]Access to AudioTrack via DefaultAudioSink[/-] [+]Allow setting preferred devices to AudioTrack [/+] on Aug 2, 2022
  6. added a commit that references this issue on Dec 8, 2022
  7. added a commit that references this issue on Feb 23, 2023
  8. christosts commented on Feb 2, 2024

    @christosts
    Contributor

    @tonihei this is completed, right?

  9. yschimke commented on Feb 2, 2024

    @yschimke
    ContributorAuthor

    I think yes via other APIs.

  10. locked and limited conversation to collaborators on Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions