audio.playdevice read/write property


Get or set the current audio playing device, as a string

Notes

  • When setting this property, use one of the playback devices listed in the audio.devices property

Example

local audio = require "audio" local console = require "console" local function write_property(name, value) -- Fancy formatting console.writecolor("yellow", name..":\t") console.writecolor("cyan", value.."\n") end -- Display the audio properties write_property("Audio playback device", audio.playdevice) write_property("Device samplerate", audio.samplerate) write_property("Device channels", audio.channels)