getOutputDevice
Description​
The currently configured output device if changed via setOutputDevice. Assumes setOutputDevice has been used.
In the web version this functionality relies on experimental APIs and might not yet be available in all browsers. https://caniuse.com/mdn-api_audiocontext_sinkid
- JavaScript
- C#
- Kotlin
getOutputDevice(): Promise<ISynthOutputDevice | null>System.Threading.Task<ISynthOutputDevice?> GetOutputDevice()suspend fun getOutputDevice(): ISynthOutputDevice?Returns​
The custom configured output device which was set via setOutputDevice or null
if the default outputDevice is used.
The output device might change dynamically if devices are connected/disconnected (e.g. bluetooth headset).
Examples​
- JavaScript
- C#
- Android
const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
updateOutputDeviceUI(await api.getOutputDevice())
var api = new AlphaTabApi<MyControl>(...);
UpdateOutputDeviceUI(await api.GetOutputDevice())
fun init() = kotlinx.coroutines.runBlocking {
val api = AlphaTabApi<MyControl>(...)
updateOutputDeviceUI(api.getOutputDevice().await())
}