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
devicestable The list of devices.
.[].iduserdata A unique, opaque id for the device.
.[].namestring A human readable name for the device.
.[].defaultboolean Whether the device is the default audio device.

See also