lovr.audio.getDevice

Edit

Returns information about the active playback or capture device.

name, id = lovr.audio.getDevice(type)

Arguments

NameTypeDefaultDescription
typeAudioType'playback' The type of device to query.

Returns

NameTypeDescription
namestring | nil The name of the device, or nil if no device is set.
iduserdata | nil The opaque id of the device, or nil if no device is set.

Notes

If no device has been set yet, this function returns nil.

The device doesn't need to be started.

See also