audio.channels readonly property


Get the current audio device number of channels, as a number.
1 channel device will play sounds in "mono", while 2 channels device will play sounds in "stereo" and more channels will play sounds in "surround"

Example

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