API reference
Preparing search index…

PlaybackDevice

Enumerations

Notification

Lifecycle notifications for the audio playback device.

Type Aliases

NotificationCallback

Callback receiving playback device status notifications.

Functions

getAvailableDevices

Return the names of available playback devices.

getDefaultDevice

Return the system's default playback device name, or undefined if unavailable.

getDevice

Return the current playback device name, or undefined if unavailable.

getDeviceSampleRate

Return the current device sample rate in Hz, or undefined if unavailable.

isDefaultDevice

Return whether the current device follows the system default.

setDevice

Switch to the named playback device and return whether it succeeded.

setDeviceToDefault

Switch to the system's default playback device and report success.

setDeviceToNull

Switch to a null device with no sound output and return whether it succeeded.

setNotificationCallback

Set the device notification callback; undefined or null removes it.

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0