audio.devices readonly property


Get the list of detected audio devices, as a table, that contains the following fields :

  • "playback": to get a table that lists audio playing devices.
  • "recording": to get a table that lists audio recoding devices.

Example

local audio = require "audio" print("Audio playback devices found :") for device in each(audio.devices.playback) do print("\t|- "..device) end print("\nAudio recording devices found :") for device in each(audio.devices.recording) do print("\t|- "..device) end