API 参考
正在准备搜索索引…

PlaybackDevice

枚举

Notification

音频播放设备的生命周期通知。

类型别名

NotificationCallback

接收播放设备状态通知的回调。

函数

getAvailableDevices

返回可用播放设备名称。

getDefaultDevice

返回系统默认播放设备名称;不可用时为 undefined。

getDevice

返回当前播放设备名称;不可用时为 undefined。

getDeviceSampleRate

返回当前设备采样率(Hz);不可用时为 undefined。

isDefaultDevice

返回当前设备是否跟随系统默认设备。

setDevice

切换到指定名称的播放设备,返回是否成功。

setDeviceToDefault

切换到系统默认播放设备,返回是否成功。

setDeviceToNull

切换到不输出声音的空设备,返回是否成功。

setNotificationCallback

设置设备通知回调;undefined 或 null 移除回调。

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