Skip to content

Allow changing of output device #1904

Closed
@Danielku15

Description

@Danielku15

See #634 (comment)

alphaTab should expose an API to allow changing the output device.

alphaTab design:

  • alphaTab should provide its own abstraction for the output devices to provide a unified experience across platforms.
  • Due to the dynamic nature of first enumerating devices and then selecting one, the output device cannot be part of the Settings
  • Low Level API:
    • The ISynthOutput initializes with the default device
    • A new interface ISynthOutputDevice { ... } will represent the platform specific devices.
    • A new interface ISynthOutput { enumerateDevices(): Promise<ISynthOutputDevice> method enumerate and list the devices (it also will request permissions if needed).
    • A new interface ISynthOutput { setOutputDevice(device: ISynthOutputDevice|null): Promise<void> method will change the output device. Null restores the default output device.
    • A new interface ISynthOutput { getOutputDevice(): Promise<ISynthOutputDevice|null> method try to determine the current output device.
    • Multiple ISynthOutputDevice instances for the same output device might be created across API calls.
  • High level API:
    • Re-Expose enumerateDevices on AlphaTabApiBase
    • Re-Expose setOutputDevice on AlphaTabApiBase
    • Re-Expose getOutputDevice on AlphaTabApiBase

Metadata

Metadata

Assignees

Labels

area-playerRelated to the audio playback engine.platform-allAffects all platformsstate-acceptedThis is a valid topic to work on.

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions