lovr.audio.getDevices

Returns a list of playback or capture devices. Each device has an id, name, and a default flag indicating whether it's the default device.

To use a specific device id for playback or capture, pass it to lovr.audio.setDevice.

devices = lovr.audio.getDevices(type)

Arguments

NameTypeDefaultDescription
typeAudioType'playback'The type of devices to query (playback or capture).

Returns

NameTypeDescription
devicestableThe list of devices.
.[].iduserdataA unique, opaque id for the device.
.[].namestringA human readable name for the device.
.[].defaultbooleanWhether the device is the default audio device.

See also